Field roomService in edu.hpu.controller.GuestController required a bean of type 'edu.hpu.service.Roo

简介: Field roomService in edu.hpu.controller.GuestController required a bean of type 'edu.hpu.service.Roo

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-05-26 16:54:56.276 ERROR 8516 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 
***************************
APPLICATION FAILED TO START
***************************
Description:
Field roomService in edu.hpu.controller.GuestController required a bean of type 'edu.hpu.service.RoomService' that could not be found.
Action:
Consider defining a bean of type 'edu.hpu.service.RoomService' in your configuration.

用spring boot报了这么个错,其实解决办法很简单,在edu.hpu.service.impl.RoomServiceImpl添加一个@Service注解。具体原因以后再学习,先跑起来。

上面这个是service,接下来,mapper也面临了同样的问题

Field roomMapper in edu.hpu.service.impl.RoomServiceImpl required a bean of type 'edu.hpu.mapper.RoomMapper' that could not be found.
Action:
Consider defining a bean of type 'edu.hpu.mapper.RoomMapper' in your configuration.
Process finished with exit code 0

同样思路,在RoomMapper接口中添加@Mapper注解。

目录
相关文章
|
Java 数据库连接 mybatis
Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
239 0
|
NoSQL Redis
Consider defining a bean of type ‘com.bsj.system.service.RedisService‘ in your configuration
Consider defining a bean of type ‘com.bsj.system.service.RedisService‘ in your configuration
589 0
Field userMapper in zero.file.videoProject.service.UserService required a bean of type ‘zero.file.vi
Field userMapper in zero.file.videoProject.service.UserService required a bean of type ‘zero.file.vi
|
8月前
|
Java Spring
Description:Field contentMapper in worldtolingyidianke.file.service.impl.ContentServiceImpl requir
Description:Field contentMapper in worldtolingyidianke.file.service.impl.ContentServiceImpl requir
|
Java 数据库连接 Redis
Bean method ‘redisConnectionFactory‘ not loaded because @ConditionalOnClass did not find required c
Bean method ‘redisConnectionFactory‘ not loaded because @ConditionalOnClass did not find required c
158 0
解决requried a bean of type xxx的问题(可能原因之一)
解决requried a bean of type xxx的问题(可能原因之一)
483 0
|
druid
A bean with that name has already been defined in class path resource and overriding is disabled.
A bean with that name has already been defined in class path resource and overriding is disabled.
256 0
Field userDao in com.sd.sbmb.service.impl.UserServiceImpl required a bean of type ‘com.sd.sbmb.dao.U
Field userDao in com.sd.sbmb.service.impl.UserServiceImpl required a bean of type ‘com.sd.sbmb.dao.U
265 0
|
XML 数据格式
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclips
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclips
125 0
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclips
|
XML 应用服务中间件 数据格式
控制台报错: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting proper
控制台报错: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting proper
119 0
控制台报错: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting proper