报以下错误,
2019-02-14 17:00:55.488 WARN 13688 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartServiceImpl': Unsatisfied dependency expressed through method 'addCart' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.Long' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2019-02-14 17:00:55.496 INFO 13688 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-02-14 17:00:55.728 ERROR 13688 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method addCart in cn.ldbz.cart.service.impl.CartServiceImpl required a bean of type 'java.lang.Long' that could not be found.
Action:
Consider defining a bean of type 'java.lang.Long' in your configuration.
发现只有注解,类声明被注释掉了
@Autowired
// private TbItemMapper itemMapper;