初学 Springboot , 自动注入Service层的类时 idea编译器报错
网上查了一下, 对项目编译无影响 然而我的编译报错
2018-09-30 10:18:04.570 ERROR 3924 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************Description:
Field girlService in com.sb.GirlController required a bean of type 'com.sb.GirlService' that could not be found.
Action:Consider defining a bean of type 'com.sb.GirlService' in your configuration.
原来 我没有在service层的类前面写注解 @Service
新手犯的错误, 就像controller层要写@RentController 一样