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注解。

目录
相关文章
|
9月前
|
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
101 0
|
Java Maven
MapStruct - Couldn‘t retrieve @Mapper annotation
MapStruct - Couldn‘t retrieve @Mapper annotation
1839 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
429 0
|
6月前
|
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
43 0
|
11月前
Error: undefined method `launchd_service_path‘ for xxx
使用brew命令进行启动就报错。
200 0
|
10月前
|
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.
150 0
|
10月前
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
146 0
|
Nacos
Nacos报错:Error creating bean with name ‘authFilterRegistration‘ defined in class path resource
Nacos报错:Error creating bean with name ‘authFilterRegistration‘ defined in class path resource
357 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
86 0
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source‘ to ‘org.eclips

热门文章

最新文章