亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

Spring-boot 啟動時碰到的錯誤

894974231 / 3211人閱讀

摘要:錯誤提示錯誤概述最近學習的使用,寫了一個小,結(jié)果總是碰到這樣的錯誤解決方法查了半天終于才上看到了解決方案,鏈接如下是因為文件不能直接放在文件夾下,必須要建一個包把他放進去

錯誤提示
Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package
錯誤概述

最近學習springboot的使用,寫了一個小demo,結(jié)果總是碰到這樣的錯誤:

** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.


2016-02-26 10:07:01.550  WARN 6112 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/C:/Users/cmc/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.2.5.RELEASE/spring-boot-autoconfigure-1.2.5.RELEASE.jar!/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$JdbcTemplateConfiguration.class]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$JdbcTemplateConfiguration due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303)
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:248)
    at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:140)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:266)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:230)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:197)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:166)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
    ...
解決方法

查了半天終于才stack overflow上看到了解決方案,鏈接如下:stack overflow
是因為application.java 文件不能直接放在main/java文件夾下,必須要建一個包把他放進去

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/65542.html

相關(guān)文章

  • Spring-Boot學習筆記

    摘要:學習筆記使用很容易創(chuàng)建一個獨立運行運行內(nèi)嵌容器準生產(chǎn)級別的基于框架的項目,使用你可以不用或者只需要很少的配置。異常消息如果這個錯誤是由異常引起的。錯誤發(fā)生時請求的路徑。 Spring-Boot 1.5 學習筆記 使用Spring Boot很容易創(chuàng)建一個獨立運行(運行jar,內(nèi)嵌Servlet容器)、準生產(chǎn)級別的基于Spring框架的項目,使用Spring Boot你可以不用或者只需要很...

    curlyCheng 評論0 收藏0
  • spring-boot登陸過濾功能

    摘要:工程除了提供后端的路由轉(zhuǎn)發(fā),還可以做全局的過濾器,所以我選擇在這個工程里面寫登陸校驗功能。如果校驗成功,返回登陸成功,否則,返回登陸失敗。前端再根據(jù)登陸情況做路由跳轉(zhuǎn)。登陸成功登陸失敗最后,貼一下啟動類的代碼 先簡單說一下我們工程的架構(gòu):前端工程是采用react,后端工程采用spring-cloud,里面分為zuul工程和其他功能模塊。zuul工程除了提供后端的路由轉(zhuǎn)發(fā),還可以做全局的...

    taoszu 評論0 收藏0
  • 使用Docker部署Spring-Boot+Vue博客系統(tǒng)

    摘要:先來看一下容器的文件中間一些操作省略這里用了多階段構(gòu)建容器,如果直接通過設(shè)置環(huán)境變量只會在后面一個階段生效,但是是在第一個階段執(zhí)行的,所以環(huán)境變量不能應用到當中。 在今年年初的時候,完成了自己的個Fame博客系統(tǒng)的實現(xiàn),當時也做了一篇博文Spring-boot+Vue = Fame 寫blog的一次小結(jié)作為記錄和介紹。從完成實現(xiàn)到現(xiàn)在,也斷斷續(xù)續(xù)的根據(jù)實際的使用情況進行更新。 只不過每...

    Eirunye 評論0 收藏0
  • spring-boot-plus 常見問題解決 FAQ(十二)

    摘要:常見問題解決編譯錯誤問題日志編譯錯誤編譯提示等日志錯誤解決檢查是否安裝插件安裝安裝運行錯誤問題錯誤不能連接解決檢查服務是否啟動檢查地址和端口號未知數(shù)據(jù)庫解決檢查是否新建數(shù)據(jù)庫默認的數(shù)據(jù)庫為,可在不同環(huán)境的配置文件中更改例如中 spring-boot-plus 常見問題解決 FAQ 編譯錯誤問題 log日志編譯錯誤 編譯提示log.info等日志錯誤 解決 檢查是否安裝lombok插件...

    RayKr 評論0 收藏0

發(fā)表評論

0條評論

最新活動
閱讀需要支付1元查看
<