这么低级的错误也范
"D:\easytool\idea\IntelliJ IDEA 2019.3.3\jbr\bin\java.exe" -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:D:\easytool\idea\IntelliJ IDEA 2019.3.3\lib\idea_rt.jar=56556:D:\easytool\idea\IntelliJ IDEA 2019.3.3\bin" -Dfile.encoding=UTF-8 -classpath D:\idea\SpringBootTest\0410-springboot-redis\target\classes;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter-web\2.4.4\spring-boot-starter-web-2.4.4.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter\2.4.4\spring-boot-starter-2.4.4.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot\2.4.4\spring-boot-2.4.4.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-autoconfigure\2.4.4\spring-boot-autoconfigure-2.4.4.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter-logging\2.4.4\spring-boot-starter-logging-2.4.4.jar;D:\easytoolweb\maven\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\easytoolweb\maven\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\easytoolweb\maven\repository\org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;D:\easytoolweb\maven\repository\org\apache\logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;D:\easytoolweb\maven\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\easytoolweb\maven\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\easytoolweb\maven\repository\org\yaml\snakeyaml\1.27\snakeyaml-1.27.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter-json\2.4.4\spring-boot-starter-json-2.4.4.jar;D:\easytoolweb\maven\repository\com\fasterxml\jackson\core\jackson-databind\2.11.4\jackson-databind-2.11.4.jar;D:\easytoolweb\maven\repository\com\fasterxml\jackson\core\jackson-annotations\2.11.4\jackson-annotations-2.11.4.jar;D:\easytoolweb\maven\repository\com\fasterxml\jackson\core\jackson-core\2.11.4\jackson-core-2.11.4.jar;D:\easytoolweb\maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.4\jackson-datatype-jdk8-2.11.4.jar;D:\easytoolweb\maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.4\jackson-datatype-jsr310-2.11.4.jar;D:\easytoolweb\maven\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.4\jackson-module-parameter-names-2.11.4.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter-tomcat\2.4.4\spring-boot-starter-tomcat-2.4.4.jar;D:\easytoolweb\maven\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.44\tomcat-embed-core-9.0.44.jar;D:\easytoolweb\maven\repository\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;D:\easytoolweb\maven\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.44\tomcat-embed-websocket-9.0.44.jar;D:\easytoolweb\maven\repository\org\springframework\spring-web\5.3.5\spring-web-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-beans\5.3.5\spring-beans-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-webmvc\5.3.5\spring-webmvc-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-aop\5.3.5\spring-aop-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-context\5.3.5\spring-context-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-expression\5.3.5\spring-expression-5.3.5.jar;D:\easytoolweb\maven\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\easytoolweb\maven\repository\org\springframework\spring-core\5.3.5\spring-core-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-jcl\5.3.5\spring-jcl-5.3.5.jar;D:\easytoolweb\maven\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.0.0\mybatis-spring-boot-starter-2.0.0.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter-jdbc\2.4.4\spring-boot-starter-jdbc-2.4.4.jar;D:\easytoolweb\maven\repository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-jdbc\5.3.5\spring-jdbc-5.3.5.jar;D:\easytoolweb\maven\repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.0.0\mybatis-spring-boot-autoconfigure-2.0.0.jar;D:\easytoolweb\maven\repository\org\mybatis\mybatis\3.5.0\mybatis-3.5.0.jar;D:\easytoolweb\maven\repository\org\mybatis\mybatis-spring\2.0.0\mybatis-spring-2.0.0.jar;D:\easytoolweb\maven\repository\mysql\mysql-connector-java\8.0.23\mysql-connector-java-8.0.23.jar;D:\easytoolweb\maven\repository\org\springframework\boot\spring-boot-starter-data-redis\2.4.4\spring-boot-starter-data-redis-2.4.4.jar;D:\easytoolweb\maven\repository\org\springframework\data\spring-data-redis\2.4.6\spring-data-redis-2.4.6.jar;D:\easytoolweb\maven\repository\org\springframework\data\spring-data-keyvalue\2.4.6\spring-data-keyvalue-2.4.6.jar;D:\easytoolweb\maven\repository\org\springframework\data\spring-data-commons\2.4.6\spring-data-commons-2.4.6.jar;D:\easytoolweb\maven\repository\org\springframework\spring-tx\5.3.5\spring-tx-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-oxm\5.3.5\spring-oxm-5.3.5.jar;D:\easytoolweb\maven\repository\org\springframework\spring-context-support\5.3.5\spring-context-support-5.3.5.jar;D:\easytoolweb\maven\repository\io\lettuce\lettuce-core\6.0.3.RELEASE\lettuce-core-6.0.3.RELEASE.jar;D:\easytoolweb\maven\repository\io\netty\netty-common\4.1.60.Final\netty-common-4.1.60.Final.jar;D:\easytoolweb\maven\repository\io\netty\netty-handler\4.1.60.Final\netty-handler-4.1.60.Final.jar;D:\easytoolweb\maven\repository\io\netty\netty-resolver\4.1.60.Final\netty-resolver-4.1.60.Final.jar;D:\easytoolweb\maven\repository\io\netty\netty-buffer\4.1.60.Final\netty-buffer-4.1.60.Final.jar;D:\easytoolweb\maven\repository\io\netty\netty-codec\4.1.60.Final\netty-codec-4.1.60.Final.jar;D:\easytoolweb\maven\repository\io\netty\netty-transport\4.1.60.Final\netty-transport-4.1.60.Final.jar;D:\easytoolweb\maven\repository\io\projectreactor\reactor-core\3.4.4\reactor-core-3.4.4.jar;D:\easytoolweb\maven\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar com.meimei.test.Application
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.4)
2021-04-11 19:31:42.801 INFO 3816 --- [ main] com.meimei.test.Application : Starting Application using Java 11.0.5 on DESKTOP-FR0HRKG with PID 3816 (D:\idea\SpringBootTest\0410-springboot-redis\target\classes started by 33383 in D:\idea\SpringBootTest\SpringDemoOne)
2021-04-11 19:31:42.803 INFO 3816 --- [ main] com.meimei.test.Application : No active profile set, falling back to default profiles: default
2021-04-11 19:31:43.353 WARN 3816 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.meimei.test]' package. Please check your configuration.
2021-04-11 19:31:43.392 INFO 3816 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2021-04-11 19:31:43.394 INFO 3816 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2021-04-11 19:31:43.412 INFO 3816 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5 ms. Found 0 Redis repository interfaces.
2021-04-11 19:31:43.957 INFO 3816 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9090 (http)
2021-04-11 19:31:43.965 INFO 3816 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-04-11 19:31:43.965 INFO 3816 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.44]
2021-04-11 19:31:43.966 INFO 3816 --- [ main] o.a.catalina.core.AprLifecycleListener : Loaded Apache Tomcat Native library [1.2.25] using APR version [1.7.0].
2021-04-11 19:31:43.967 INFO 3816 --- [ main] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2021-04-11 19:31:43.967 INFO 3816 --- [ main] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2021-04-11 19:31:43.971 INFO 3816 --- [ main] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.1.1g 21 Apr 2020]
2021-04-11 19:31:44.031 INFO 3816 --- [ main] o.a.c.c.C.[.[.[/016-springboot-redis] : Initializing Spring embedded WebApplicationContext
2021-04-11 19:31:44.032 INFO 3816 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1193 ms
2021-04-11 19:31:44.070 WARN 3816 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentController': Unsatisfied dependency expressed through field 'studentService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.meimei.test.service.StudentService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2021-04-11 19:31:44.072 INFO 3816 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2021-04-11 19:31:44.085 INFO 3816 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-04-11 19:31:44.099 ERROR 3816 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field studentService in com.meimei.test.web.StudentController required a bean of type 'com.meimei.test.service.StudentService' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.meimei.test.service.StudentService' in your configuration.
Process finished with exit code 1
注意看一下错误提示 required a bean of type ‘com.meimei.test.service.StudentService’ that could not be found.把包名去掉提示是找不到bean
也就是Controller找不到Service说白了就是没在Service添加注解