springboot启动报错,求助

工具类


实现类引入工具类

启动类

为啥找不到,是需要扫描他那个包吗

没看出来什么问题,@Component也是在扫描路径的。你把完整的异常堆栈信息复制出来看看。

2020-09-08 13:27:46.132 ERROR 6444 — [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field generateToken in com.mayikt.pay.service.impl.PayMentTransacServiceImpl required a bean of type ‘com.mayikt.core.token.GenerateToken’ that could not be found.

Action:

Consider defining a bean of type ‘com.mayikt.core.token.GenerateToken’ in your configuration.

Disconnected from the target VM, address: ‘127.0.0.1:57681’, transport: ‘socket’

Process finished with exit code 1

完整的启动日志。。。

D:\java\jdk1.8.0_131\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:57681,suspend=y,server=n -Dvisualvm.id=14043980036900 -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.2\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "D:\java\jdk1.8.0_131\jre\lib\charsets.jar;D:\java\jdk1.8.0_131\jre\lib\deploy.jar;D:\java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;D:\java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;D:\java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;D:\java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;D:\java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;D:\java\jdk1.8.0_131\jre\lib\ext\localedata.jar;D:\java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;D:\java\jdk1.8.0_131\jre\lib\ext\sunec.jar;D:\java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;D:\java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;D:\java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;D:\java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;D:\java\jdk1.8.0_131\jre\lib\javaws.jar;D:\java\jdk1.8.0_131\jre\lib\jce.jar;D:\java\jdk1.8.0_131\jre\lib\jfr.jar;D:\java\jdk1.8.0_131\jre\lib\jfxswt.jar;D:\java\jdk1.8.0_131\jre\lib\jsse.jar;D:\java\jdk1.8.0_131\jre\lib\management-agent.jar;D:\java\jdk1.8.0_131\jre\lib\plugin.jar;D:\java\jdk1.8.0_131\jre\lib\resources.jar;D:\java\jdk1.8.0_131\jre\lib\rt.jar;E:\meite-shop-parent\meite-shop-service-impl\meite-shop-service-pay\target\classes;E:\meite-shop-parent\meite-shop-service-api\meite-shop-service-api-pay\target\classes;E:\meite-shop-parent\meite-shop-api-dto\meite-shop-api-pay-dto\target\classes;E:\Maven\localRepository\com\spring4all\swagger-spring-boot-starter\1.7.0.RELEASE\swagger-spring-boot-starter-1.7.0.RELEASE.jar;E:\Maven\localRepository\io\springfox\springfox-swagger-ui\2.8.0\springfox-swagger-ui-2.8.0.jar;E:\Maven\localRepository\io\springfox\springfox-spring-web\2.8.0\springfox-spring-web-2.8.0.jar;E:\Maven\localRepository\org\reflections\reflections\0.9.11\reflections-0.9.11.jar;E:\Maven\localRepository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;E:\Maven\localRepository\io\springfox\springfox-swagger2\2.8.0\springfox-swagger2-2.8.0.jar;E:\Maven\localRepository\io\swagger\swagger-annotations\1.5.14\swagger-annotations-1.5.14.jar;E:\Maven\localRepository\io\swagger\swagger-models\1.5.14\swagger-models-1.5.14.jar;E:\Maven\localRepository\io\springfox\springfox-spi\2.8.0\springfox-spi-2.8.0.jar;E:\Maven\localRepository\io\springfox\springfox-core\2.8.0\springfox-core-2.8.0.jar;E:\Maven\localRepository\io\springfox\springfox-schema\2.8.0\springfox-schema-2.8.0.jar;E:\Maven\localRepository\io\springfox\springfox-swagger-common\2.8.0\springfox-swagger-common-2.8.0.jar;E:\Maven\localRepository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;E:\Maven\localRepository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;E:\Maven\localRepository\org\mapstruct\mapstruct\1.2.0.Final\mapstruct-1.2.0.Final.jar;E:\Maven\localRepository\io\springfox\springfox-bean-validators\2.8.0\springfox-bean-validators-2.8.0.jar;E:\meite-shop-parent\meite-shop-common\meite-shop-common-core\target\classes;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-data-redis\2.0.1.RELEASE\spring-boot-starter-data-redis-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\springframework\data\spring-data-redis\2.0.6.RELEASE\spring-data-redis-2.0.6.RELEASE.jar;E:\Maven\localRepository\org\springframework\data\spring-data-keyvalue\2.0.6.RELEASE\spring-data-keyvalue-2.0.6.RELEASE.jar;E:\Maven\localRepository\org\springframework\data\spring-data-commons\2.0.6.RELEASE\spring-data-commons-2.0.6.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-oxm\5.0.5.RELEASE\spring-oxm-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-context-support\5.0.5.RELEASE\spring-context-support-5.0.5.RELEASE.jar;E:\Maven\localRepository\io\lettuce\lettuce-core\5.0.3.RELEASE\lettuce-core-5.0.3.RELEASE.jar;E:\Maven\localRepository\io\projectreactor\reactor-core\3.1.6.RELEASE\reactor-core-3.1.6.RELEASE.jar;E:\Maven\localRepository\org\reactivestreams\reactive-streams\1.0.2\reactive-streams-1.0.2.jar;E:\Maven\localRepository\io\netty\netty-common\4.1.23.Final\netty-common-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-transport\4.1.23.Final\netty-transport-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-buffer\4.1.23.Final\netty-buffer-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-resolver\4.1.23.Final\netty-resolver-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-handler\4.1.23.Final\netty-handler-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-codec\4.1.23.Final\netty-codec-4.1.23.Final.jar;E:\Maven\localRepository\org\springframework\spring-jdbc\5.0.5.RELEASE\spring-jdbc-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-tx\5.0.5.RELEASE\spring-tx-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-starter-openfeign\2.0.0.M1\spring-cloud-starter-openfeign-2.0.0.M1.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-starter\2.0.0.M7\spring-cloud-starter-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-context\2.0.0.M7\spring-cloud-context-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\security\spring-security-rsa\1.0.5.RELEASE\spring-security-rsa-1.0.5.RELEASE.jar;E:\Maven\localRepository\org\bouncycastle\bcpkix-jdk15on\1.56\bcpkix-jdk15on-1.56.jar;E:\Maven\localRepository\org\bouncycastle\bcprov-jdk15on\1.56\bcprov-jdk15on-1.56.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-openfeign-core\2.0.0.M1\spring-cloud-openfeign-core-2.0.0.M1.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-autoconfigure\2.0.1.RELEASE\spring-boot-autoconfigure-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-netflix-ribbon\2.0.0.M7\spring-cloud-netflix-ribbon-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-aop\2.0.1.RELEASE\spring-boot-starter-aop-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;E:\Maven\localRepository\org\springframework\spring-web\5.0.5.RELEASE\spring-web-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-beans\5.0.5.RELEASE\spring-beans-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-commons\2.0.0.M7\spring-cloud-commons-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\security\spring-security-crypto\5.0.4.RELEASE\spring-security-crypto-5.0.4.RELEASE.jar;E:\Maven\localRepository\org\apache\httpcomponents\httpclient\4.5.5\httpclient-4.5.5.jar;E:\Maven\localRepository\org\apache\httpcomponents\httpcore\4.4.9\httpcore-4.4.9.jar;E:\Maven\localRepository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;E:\Maven\localRepository\io\github\openfeign\feign-core\9.5.1\feign-core-9.5.1.jar;E:\Maven\localRepository\io\github\openfeign\feign-slf4j\9.5.1\feign-slf4j-9.5.1.jar;E:\Maven\localRepository\io\github\openfeign\feign-hystrix\9.5.1\feign-hystrix-9.5.1.jar;E:\Maven\localRepository\com\netflix\archaius\archaius-core\0.7.5\archaius-core-0.7.5.jar;E:\Maven\localRepository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;E:\Maven\localRepository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;E:\Maven\localRepository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;E:\Maven\localRepository\io\github\openfeign\feign-java8\9.5.1\feign-java8-9.5.1.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\2.0.0.M7\spring-cloud-starter-netflix-ribbon-2.0.0.M7.jar;E:\Maven\localRepository\com\netflix\ribbon\ribbon\2.2.4\ribbon-2.2.4.jar;E:\Maven\localRepository\com\netflix\ribbon\ribbon-transport\2.2.4\ribbon-transport-2.2.4.jar;E:\Maven\localRepository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;E:\Maven\localRepository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;E:\Maven\localRepository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;E:\Maven\localRepository\io\netty\netty-codec-http\4.1.23.Final\netty-codec-http-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-transport-native-epoll\4.1.23.Final\netty-transport-native-epoll-4.1.23.Final.jar;E:\Maven\localRepository\io\netty\netty-transport-native-unix-common\4.1.23.Final\netty-transport-native-unix-common-4.1.23.Final.jar;E:\Maven\localRepository\com\netflix\ribbon\ribbon-core\2.2.4\ribbon-core-2.2.4.jar;E:\Maven\localRepository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;E:\Maven\localRepository\com\netflix\ribbon\ribbon-httpclient\2.2.4\ribbon-httpclient-2.2.4.jar;E:\Maven\localRepository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;E:\Maven\localRepository\com\netflix\netflix-commons\netflix-commons-util\0.1.1\netflix-commons-util-0.1.1.jar;E:\Maven\localRepository\com\netflix\ribbon\ribbon-loadbalancer\2.2.4\ribbon-loadbalancer-2.2.4.jar;E:\Maven\localRepository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;E:\Maven\localRepository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\2.0.0.M7\spring-cloud-starter-netflix-archaius-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-netflix-archaius\2.0.0.M7\spring-cloud-netflix-archaius-2.0.0.M7.jar;E:\Maven\localRepository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;E:\Maven\localRepository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;E:\Maven\localRepository\com\fasterxml\jackson\core\jackson-core\2.9.3\jackson-core-2.9.3.jar;E:\Maven\localRepository\com\fasterxml\jackson\core\jackson-databind\2.9.3\jackson-databind-2.9.3.jar;E:\Maven\localRepository\com\ctrip\framework\apollo\apollo-client\1.2.0\apollo-client-1.2.0.jar;E:\Maven\localRepository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;E:\Maven\localRepository\javax\inject\javax.inject\1\javax.inject-1.jar;E:\Maven\localRepository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;E:\Maven\localRepository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;E:\Maven\localRepository\com\ctrip\framework\apollo\apollo-core\1.2.0\apollo-core-1.2.0.jar;E:\Maven\localRepository\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar;E:\Maven\localRepository\com\google\guava\guava\18.0\guava-18.0.jar;E:\Maven\localRepository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar;E:\Maven\localRepository\org\mybatis\spring\boot\mybatis-spring-boot-starter\1.1.1\mybatis-spring-boot-starter-1.1.1.jar;E:\Maven\localRepository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\1.1.1\mybatis-spring-boot-autoconfigure-1.1.1.jar;E:\Maven\localRepository\org\mybatis\mybatis\3.4.0\mybatis-3.4.0.jar;E:\Maven\localRepository\org\mybatis\mybatis-spring\1.3.0\mybatis-spring-1.3.0.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot\2.0.1.RELEASE\spring-boot-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-jdbc\2.0.1.RELEASE\spring-boot-starter-jdbc-2.0.1.RELEASE.jar;E:\Maven\localRepository\com\zaxxer\HikariCP\2.7.8\HikariCP-2.7.8.jar;E:\Maven\localRepository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;E:\Maven\localRepository\org\projectlombok\lombok\1.16.20\lombok-1.16.20.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter\2.0.1.RELEASE\spring-boot-starter-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-logging\2.0.1.RELEASE\spring-boot-starter-logging-2.0.1.RELEASE.jar;E:\Maven\localRepository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\Maven\localRepository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\Maven\localRepository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;E:\Maven\localRepository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;E:\Maven\localRepository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;E:\Maven\localRepository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;E:\Maven\localRepository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;E:\Maven\localRepository\net\bytebuddy\byte-buddy\1.7.11\byte-buddy-1.7.11.jar;E:\Maven\localRepository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;E:\Maven\localRepository\org\springframework\spring-core\5.0.5.RELEASE\spring-core-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-jcl\5.0.5.RELEASE\spring-jcl-5.0.5.RELEASE.jar;E:\Maven\localRepository\com\alibaba\fastjson\1.2.30\fastjson-1.2.30.jar;E:\Maven\localRepository\junit\junit\4.12\junit-4.12.jar;E:\Maven\localRepository\commons-net\commons-net\3.3\commons-net-3.3.jar;E:\Maven\localRepository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;E:\Maven\localRepository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-web\2.0.1.RELEASE\spring-boot-starter-web-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-json\2.0.1.RELEASE\spring-boot-starter-json-2.0.1.RELEASE.jar;E:\Maven\localRepository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.3\jackson-datatype-jdk8-2.9.3.jar;E:\Maven\localRepository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.3\jackson-datatype-jsr310-2.9.3.jar;E:\Maven\localRepository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.3\jackson-module-parameter-names-2.9.3.jar;E:\Maven\localRepository\org\springframework\boot\spring-boot-starter-tomcat\2.0.1.RELEASE\spring-boot-starter-tomcat-2.0.1.RELEASE.jar;E:\Maven\localRepository\org\apache\tomcat\embed\tomcat-embed-core\8.5.29\tomcat-embed-core-8.5.29.jar;E:\Maven\localRepository\org\apache\tomcat\embed\tomcat-embed-el\8.5.29\tomcat-embed-el-8.5.29.jar;E:\Maven\localRepository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.29\tomcat-embed-websocket-8.5.29.jar;E:\Maven\localRepository\org\hibernate\validator\hibernate-validator\6.0.9.Final\hibernate-validator-6.0.9.Final.jar;E:\Maven\localRepository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\Maven\localRepository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;E:\Maven\localRepository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;E:\Maven\localRepository\org\springframework\spring-webmvc\5.0.5.RELEASE\spring-webmvc-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-aop\5.0.5.RELEASE\spring-aop-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-context\5.0.5.RELEASE\spring-context-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\spring-expression\5.0.5.RELEASE\spring-expression-5.0.5.RELEASE.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-client\2.0.0.M7\spring-cloud-starter-netflix-eureka-client-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-netflix-core\2.0.0.M7\spring-cloud-netflix-core-2.0.0.M7.jar;E:\Maven\localRepository\org\springframework\cloud\spring-cloud-netflix-eureka-client\2.0.0.M7\spring-cloud-netflix-eureka-client-2.0.0.M7.jar;E:\Maven\localRepository\com\netflix\eureka\eureka-client\1.8.6\eureka-client-1.8.6.jar;E:\Maven\localRepository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;E:\Maven\localRepository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;E:\Maven\localRepository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;E:\Maven\localRepository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;E:\Maven\localRepository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;E:\Maven\localRepository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;E:\Maven\localRepository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;E:\Maven\localRepository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;E:\Maven\localRepository\antlr\antlr\2.7.7\antlr-2.7.7.jar;E:\Maven\localRepository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;E:\Maven\localRepository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;E:\Maven\localRepository\com\netflix\servo\servo-core\0.10.1\servo-core-0.10.1.jar;E:\Maven\localRepository\com\netflix\servo\servo-internal\0.10.1\servo-internal-0.10.1.jar;E:\Maven\localRepository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;E:\Maven\localRepository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;E:\Maven\localRepository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;E:\Maven\localRepository\com\github\vlsi\compactmap\compactmap\1.2.1\compactmap-1.2.1.jar;E:\Maven\localRepository\com\github\andrewoma\dexx\dexx-collections\0.2\dexx-collections-0.2.jar;E:\Maven\localRepository\com\netflix\eureka\eureka-core\1.8.6\eureka-core-1.8.6.jar;E:\Maven\localRepository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;E:\Maven\localRepository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;E:\Maven\localRepository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;E:\Maven\localRepository\com\netflix\ribbon\ribbon-eureka\2.2.4\ribbon-eureka-2.2.4.jar;E:\Maven\localRepository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;E:\Maven\localRepository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;E:\Maven\localRepository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;D:\IntelliJ IDEA 2020.2\lib\idea_rt.jar" com.mayikt.pay.PayApp
Connected to the target VM, address: '127.0.0.1:57681', transport: 'socket'
2020-09-08 13:27:38.731  INFO 6444 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@52b56a3e: startup date [Tue Sep 08 13:27:38 CST 2020]; root of context hierarchy
2020-09-08 13:27:39.075  INFO 6444 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2020-09-08 13:27:39.141  INFO 6444 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$586eab3b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.1.RELEASE)

2020-09-08 13:27:43.270  INFO 6444 --- [           main] com.mayikt.pay.PayApp                    : No active profile set, falling back to default profiles: default
2020-09-08 13:27:43.290  INFO 6444 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@38eb2fb0: startup date [Tue Sep 08 13:27:43 CST 2020]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@52b56a3e
2020-09-08 13:27:44.097  INFO 6444 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2020-09-08 13:27:44.469  INFO 6444 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=2013da99-2690-3c6f-9fd0-99c9ae2f297a
2020-09-08 13:27:44.491  INFO 6444 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2020-09-08 13:27:44.630  INFO 6444 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$3c54a83e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-08 13:27:44.692  INFO 6444 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$586eab3b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-08 13:27:45.099  INFO 6444 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8600 (http)
2020-09-08 13:27:45.128  INFO 6444 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-09-08 13:27:45.128  INFO 6444 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.29
2020-09-08 13:27:45.134  INFO 6444 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\java\jdk1.8.0_131\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Xshell\;D:\Xftp 6\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\Redis\;D:\java\jdk1.8.0_131\bin;D:\java\jre\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;D:\apache-maven-3.3.9\bin;D:\nginx-1.12.2;D:\Redis;D:\RuanJain\nodejs;D:\mysql57\bin;D:\Git\cmd;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;D:\RuanJain\WebStorm\bin;;d:\RuanJain\Microsoft VS Code\bin;D:\RuanJain\IntelliJ IDEA\bin;;.]
2020-09-08 13:27:45.297  INFO 6444 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-09-08 13:27:45.297  INFO 6444 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2007 ms
2020-09-08 13:27:45.486  INFO 6444 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2020-09-08 13:27:45.495  INFO 6444 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2020-09-08 13:27:45.496  INFO 6444 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2020-09-08 13:27:45.496  INFO 6444 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2020-09-08 13:27:45.496  INFO 6444 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2020-09-08 13:27:45.918  WARN 6444 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payMentTransacServiceImpl': Unsatisfied dependency expressed through field 'generateToken'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.mayikt.core.token.GenerateToken' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2020-09-08 13:27:45.919  INFO 6444 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2020-09-08 13:27:45.937  INFO 6444 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-09-08 13:27:46.132 ERROR 6444 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field generateToken in com.mayikt.pay.service.impl.PayMentTransacServiceImpl required a bean of type 'com.mayikt.core.token.GenerateToken' that could not be found.


Action:

Consider defining a bean of type 'com.mayikt.core.token.GenerateToken' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:57681', transport: 'socket'

Process finished with exit code 1

你的@SpringBootApplicationcom.mayikt.pay 包下。默认就只会扫描 com.mayikt.pay这个包,以及子包下的组件。但是你这 GenerateToken类在 com.mayikt.core.token包下。扫描不到

  • com.mayikt.pay
  • com.mayikt.core.token

@SpringBootApplication注解添加属性试试看吧

@SpringBootApplication(scanBasePackages = "com.mayikt")
1赞


我先试试加这个

谢谢老哥了 这两种都能实现


提问尽量复制代码 ,别人可以复制过去帮你看问题。
你这一堆图,我要照着图输你写的代码。。很难受。

幸苦了幸苦了,下次一定注意 感谢老哥