亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

出現Field girlRepository in com.rjx.springbootdemo.GirlController required a bean of type 'com.rjx.springbootdemo.GirlRepository' that could not be found.問題,該如何解決?

? . ? ____ ? ? ? ? ?_ ? ? ? ? ? ?__ _ _

?/\\ / ___'_ __ _ _(_)_ __ ?__ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

?\\/ ?___)| |_)| | | | | || (_| | ?) ) ) )

? ' ?|____| .__|_| |_|_| |_\__, | / / / /

?=========|_|==============|___/=/_/_/_/

?:: Spring Boot :: ? ? ? ?(v1.4.7.RELEASE)


2018-03-02 01:47:27.951 ?INFO 5996 --- [ ? ? ? ? ? main] c.r.s.SpringbootdemoApplication ? ? ? ? ?: Starting SpringbootdemoApplication on Prayjourney with PID 5996 (D:\MyAllCodes\MySpringL\springbootdemo\target\classes started by prayjourney in D:\MyAllCodes\MySpringL\springbootdemo)

2018-03-02 01:47:27.958 ?INFO 5996 --- [ ? ? ? ? ? main] c.r.s.SpringbootdemoApplication ? ? ? ? ?: The following profiles are active: dev

2018-03-02 01:47:28.115 ?INFO 5996 --- [ ? ? ? ? ? main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4d9e68d0: startup date [Fri Mar 02 01:47:28 CST 2018]; root of context hierarchy

2018-03-02 01:47:32.900 ?INFO 5996 --- [ ? ? ? ? ? main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8083 (http)

2018-03-02 01:47:32.924 ?INFO 5996 --- [ ? ? ? ? ? main] o.apache.catalina.core.StandardService ? : Starting service [Tomcat]

2018-03-02 01:47:32.926 ?INFO 5996 --- [ ? ? ? ? ? main] org.apache.catalina.core.StandardEngine ?: Starting Servlet Engine: Apache Tomcat/8.5.15

2018-03-02 01:47:33.162 ?INFO 5996 --- [ost-startStop-1] o.a.c.c.C.[.[.[/springbootdemo] ? ? ? ? ?: Initializing Spring embedded WebApplicationContext

2018-03-02 01:47:33.163 ?INFO 5996 --- [ost-startStop-1] o.s.web.context.ContextLoader ? ? ? ? ? ?: Root WebApplicationContext: initialization completed in 5054 ms

2018-03-02 01:47:33.525 ?INFO 5996 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean ?: Mapping servlet: 'dispatcherServlet' to [/]

2018-03-02 01:47:33.540 ?INFO 5996 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'characterEncodingFilter' to: [/*]

2018-03-02 01:47:33.541 ?INFO 5996 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]

2018-03-02 01:47:33.543 ?INFO 5996 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'httpPutFormContentFilter' to: [/*]

2018-03-02 01:47:33.544 ?INFO 5996 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean ? : Mapping filter: 'requestContextFilter' to: [/*]

2018-03-02 01:47:33.684 ?WARN 5996 --- [ ? ? ? ? ? main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'girlController': Unsatisfied dependency expressed through field 'girlRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.rjx.springbootdemo.GirlRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

2018-03-02 01:47:33.691 ?INFO 5996 --- [ ? ? ? ? ? main] o.apache.catalina.core.StandardService ? : Stopping service [Tomcat]

2018-03-02 01:47:33.773 ?INFO 5996 --- [ ? ? ? ? ? main] utoConfigurationReportLoggingInitializer :?


Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.

2018-03-02 01:47:34.250 ERROR 5996 --- [ ? ? ? ? ? main] o.s.b.d.LoggingFailureAnalysisReporter ? :?


***************************

APPLICATION FAILED TO START

***************************


Description:


Field girlRepository in com.rjx.springbootdemo.GirlController required a bean of type 'com.rjx.springbootdemo.GirlRepository' that could not be found.



Action:


Consider defining a bean of type 'com.rjx.springbootdemo.GirlRepository' in your configuration.



Process finished with exit code 1


正在回答

4 回答

girlservice類上加個@Service注解聲明一下

1 回復 有任何疑惑可以回復我~

也是遇到同樣為問題

求解答

0 回復 有任何疑惑可以回復我~

解決了嗎?
我也報同樣的錯誤

0 回復 有任何疑惑可以回復我~
#1

游俠最光陰 提問者

沒有解決啊
2018-03-12 回復 有任何疑惑可以回復我~

你得把你的代碼發出來,光看報錯怎么知道哪里錯了

0 回復 有任何疑惑可以回復我~
#1

游俠最光陰 提問者

代碼就是老師的代碼???
2018-03-02 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
2小時學會Spring Boot
  • 參與學習       151526    人
  • 解答問題       1132    個

Spring Boot入門視頻教程,你將學會使用Spring Boot快速構建應用程序

進入課程

出現Field girlRepository in com.rjx.springbootdemo.GirlController required a bean of type 'com.rjx.springbootdemo.GirlRepository' that could not be found.問題,該如何解決?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號