请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

a bean of type 'ProductRepository' that could not be found.

E:\Java\jdk1.8.0_151\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true “-javaagent:E:\JetBrains\IntelliJ IDEA 2018.3.5\lib\idea_rt.jar=60537:E:\JetBrains\IntelliJ IDEA 2018.3.5\bin” -Dfile.encoding=UTF-8 -classpath E:\Java\jdk1.8.0_151\jre\lib\charsets.jar;E:\Java\jdk1.8.0_151\jre\lib\deploy.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\access-bridge-64.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\cldrdata.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\dnsns.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\jaccess.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\jfxrt.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\localedata.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\nashorn.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\sunec.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\sunjce_provider.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\sunmscapi.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\sunpkcs11.jar;E:\Java\jdk1.8.0_151\jre\lib\ext\zipfs.jar;E:\Java\jdk1.8.0_151\jre\lib\javaws.jar;E:\Java\jdk1.8.0_151\jre\lib\jce.jar;E:\Java\jdk1.8.0_151\jre\lib\jfr.jar;E:\Java\jdk1.8.0_151\jre\lib\jfxswt.jar;E:\Java\jdk1.8.0_151\jre\lib\jsse.jar;E:\Java\jdk1.8.0_151\jre\lib\management-agent.jar;E:\Java\jdk1.8.0_151\jre\lib\plugin.jar;E:\Java\jdk1.8.0_151\jre\lib\resources.jar;E:\Java\jdk1.8.0_151\jre\lib\rt.jar;F:\IdeaProjects\financial\manager\out\production\classes;F:\IdeaProjects\financial\manager\out\production\resources;F:\IdeaProjects\financial\entity\out\production\classes;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\1.5.4.RELEASE\5d6c554f34b20dffcbdfc7edf9b80956e2dace\spring-boot-starter-web-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-data-jpa\1.5.4.RELEASE\61bafdbd6d31e67b024c432de34a19b35e46c062\spring-boot-starter-data-jpa-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.5\6c6c702c89bfff3cd9e80b04d668c5e190d588c6\commons-lang3-3.5.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\mysql\mysql-connector-java\5.1.29\91798a4463050f61598122fe7fdc24aa196dfc0c\mysql-connector-java-5.1.29.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-aop\1.5.4.RELEASE\1650672554abd364c728de5ce1aba7c28181968c\spring-boot-starter-aop-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-jdbc\1.5.4.RELEASE\587ab04faeaeb2cbec0adf8fba68ee278d2c8764\spring-boot-starter-jdbc-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\1.5.4.RELEASE\74d5aa641503ddd12833c82cc19b295f9f40e8fa\spring-boot-starter-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\1.5.4.RELEASE\d7e26f1d0e594bd1aab7da227649fc12c1958416\spring-boot-starter-tomcat-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-validator\5.3.5.Final\622a9bcef2eed6d41b5b8e0662c36212009e375\hibernate-validator-5.3.5.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.8.8\bf88c7b27e95cbadce4e7c316a56c3efffda8026\jackson-databind-2.8.8.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\4.3.9.RELEASE\ca80b4a00abc388d8046bf372099f35564371c47\spring-webmvc-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\4.3.9.RELEASE\91dae64c4280093ad5fb4736a10913c9233479c1\spring-web-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-entitymanager\5.0.12.Final\302a526f5058290e9cbd719a5caf9f248d344719\hibernate-entitymanager-5.0.12.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-core\5.0.12.Final\e58bf1c660e6706d8e2cbb53bae110f574366102\hibernate-core-5.0.12.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.2\d81aff979d603edd90dcd8db2abc1f4ce6479e3e\javax.transaction-api-1.2.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\1.11.4.RELEASE\9f559debeb095fb0040102aef37e5fee2830a470\spring-data-jpa-1.11.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-aspects\4.3.9.RELEASE\6030e253c56ff13df8c1c0e5e17c3b50e5e368b9\spring-aspects-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\1.5.4.RELEASE\5591fa7358d950f374532c7d92dccf113ebfa1bb\spring-boot-autoconfigure-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\1.5.4.RELEASE\cf51bb0751c1362a417eb59824d27d2907780d2\spring-boot-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\1.5.4.RELEASE\6b4364cfee82890ce9a9c2c59066f3a6e525debd\spring-boot-starter-logging-1.5.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\4.3.9.RELEASE\a186823724f03b98becd5f93b1fa107fe6f7a7ff\spring-context-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\4.3.9.RELEASE\95f5f5cf3cae64266a89dc1bc9e0484425cd8358\spring-aop-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\4.3.9.RELEASE\ea9de867a7b686744f0e0bc1ecfcc9d3844e4cd7\spring-orm-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\4.3.9.RELEASE\ef8476b954a4211a21147b3ae15996443a76c6f8\spring-jdbc-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\1.13.4.RELEASE\1a45b99bd63449ba31963237993d4a45b9f96abc\spring-data-commons-1.13.4.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\4.3.9.RELEASE\7a7b1775e1e604841f8b619e110e43d9929c37ab\spring-tx-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\4.3.9.RELEASE\daa5abf3779c8cad1a2910e1ea08e4272489d8ae\spring-beans-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\4.3.9.RELEASE\4edca6913da9e62a6586714e053e01a61952a153\spring-expression-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\4.3.9.RELEASE\430b7298bfb85d66fb61e19ca8f06231b911e9f5\spring-core-4.3.9.RELEASE.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\8.5.15\a92b066b0ea9ee1cb05b7d5e4bfed4ad8898f741\tomcat-embed-websocket-8.5.15.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\8.5.15\f197a93ae66212767b004fd93d7a1a8ea62bc3fa\tomcat-embed-core-8.5.15.jar;C:\Users\asus.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\8.5.15\e4000e5386056eeebb43bf71e7d30c58d2473166\tomcat-embed-el-8.5.15.jar;C:\Users\asus.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\5.0.1.Final\71e1cff3fcb20d3b3af4f3363c3ddb24d33c6879\hibernate-commons-annotations-5.0.1.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.3.0.Final\3616bb87707910296e2c195dc016287080bba5af\jboss-logging-3.3.0.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.3.1\2ad2fd09dcf5607ca96f8ef432096a96986c40a\classmate-1.3.1.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.8.0\45b426f7796b741035581a176744d91090e2e6fb\jackson-annotations-2.8.0.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.8.8\d478fb6de45a7c3d2cad07c8ad70c7f0a797a020\jackson-core-2.8.8.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.8.10\e198c5fee28988c355f74e06461614eae36b2032\aspectjweaver-1.8.10.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.apache.tomcat\tomcat-jdbc\8.5.15\1f802a58c21283fcdff1572a390bf98ae7231ea3\tomcat-jdbc-8.5.15.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.hibernate.javax.persistence\hibernate-jpa-2.1-api\1.0.0.Final\5e731d961297e5a07290bfaf3db1fbc8bbbf405a\hibernate-jpa-2.1-api-1.0.0.Final.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.javassist\javassist\3.18.1-GA\d9a09f7732226af26bf99f19e2cffe0ae219db5b\javassist-3.18.1-GA.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\antlr\antlr\2.7.7\83cd2cd674a217ade95a4bb83a8a14f351f48bd0\antlr-2.7.7.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.jboss\jandex\2.0.0.Final\3e899258936f94649c777193e1be846387ed54b3\jandex-2.0.0.Final.jar;C:\Users\asus.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.1.11\ccedfbacef4a6515d2983e3f89ed753d5d4fb665\logback-classic-1.1.11.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.slf4j\jcl-over-slf4j\1.7.25\f8c32b13ff142a513eeb5b6330b1588dcb2c0461\jcl-over-slf4j-1.7.25.jar;C:\Users\asus.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\asus.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\asus.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\asus.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\org.apache.tomcat\tomcat-juli\8.5.15\b21c47750b0d0356acbbbf0c30cb36cb2268dc8d\tomcat-juli-8.5.15.jar;C:\Users\asus.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\asus.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.1.11\88b8df40340eed549fb07e2613879bf6b006704d\logback-core-1.1.11.jar com.zzw.manager.ManagerApp

. ____ _ __ _ _
/\ / __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ’ / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
’ |
| .__|| ||| |__, | / / / /
=|_|======|/=////
:: Spring Boot :: (v1.5.4.RELEASE)

2019-03-24 23:03:15.299 INFO 107288 — [ main] com.zzw.manager.ManagerApp : Starting ManagerApp on CODE with PID 107288 (F:\IdeaProjects\financial\manager\out\production\classes started by asus in F:\IdeaProjects\financial)
2019-03-24 23:03:15.302 INFO 107288 — [ main] com.zzw.manager.ManagerApp : No active profile set, falling back to default profiles: default
2019-03-24 23:03:15.374 INFO 107288 — [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7880cdf3: startup date [Sun Mar 24 23:03:15 CST 2019]; root of context hierarchy
2019-03-24 23:03:16.504 INFO 107288 — [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8081 (http)
2019-03-24 23:03:16.515 INFO 107288 — [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-03-24 23:03:16.516 INFO 107288 — [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.15
2019-03-24 23:03:16.645 INFO 107288 — [ost-startStop-1] o.a.c.c.C.[.[localhost].[/manager] : Initializing Spring embedded WebApplicationContext
2019-03-24 23:03:16.646 INFO 107288 — [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1272 ms
2019-03-24 23:03:16.831 INFO 107288 — [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: ‘dispatcherServlet’ to [/]
2019-03-24 23:03:16.834 INFO 107288 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘characterEncodingFilter’ to: [/]
2019-03-24 23:03:16.835 INFO 107288 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘hiddenHttpMethodFilter’ to: [/
]
2019-03-24 23:03:16.835 INFO 107288 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘httpPutFormContentFilter’ to: [/]
2019-03-24 23:03:16.835 INFO 107288 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘requestContextFilter’ to: [/
]
2019-03-24 23:03:16.867 WARN 107288 — [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘productController’: Unsatisfied dependency expressed through field ‘service’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘productService’: Unsatisfied dependency expressed through field ‘repository’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.zzw.manager.repositories.ProductRepository’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2019-03-24 23:03:16.868 INFO 107288 — [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2019-03-24 23:03:16.878 WARN 107288 — [ost-startStop-1] o.a.c.loader.WebappClassLoaderBase : The web application [manager] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:40)
2019-03-24 23:03:16.885 INFO 107288 — [ main] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled.
2019-03-24 23:03:16.974 ERROR 107288 — [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field repository in com.zzw.manager.service.ProductService required a bean of type ‘com.zzw.manager.repositories.ProductRepository’ that could not be found.

Action:

Consider defining a bean of type ‘com.zzw.manager.repositories.ProductRepository’ in your configuration.

Process finished with exit code 1

正在回答

1回答

看看repository的配置,应该是包名忘记改了你

0 回复 有任何疑惑可以回复我~
  • 提问者 梦之幻0 #1
    老师您好,按教程就写了一个repository接口,哪里还需要配置吗
    回复 有任何疑惑可以回复我~ 2019-03-25 14:04:44
  • skyding 回复 提问者 梦之幻0 #2
    不知道你学习到哪里了?如果还没有配置多数据源那就是看着你的接口不在启动类的扫描路径下,添加一下扫描就行了
    回复 有任何疑惑可以回复我~ 2019-03-25 14:10:05
  • 提问者 梦之幻0 回复 skyding #3
    我就学到 查询产品,看到您的教程 可以正常启动呀
    回复 有任何疑惑可以回复我~ 2019-03-25 14:13:14
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信