当前位置: 代码迷 >> 综合 >> 错误@org.springframework.beans.factory.annotation.Autowired(required=true)
  详细解决方案

错误@org.springframework.beans.factory.annotation.Autowired(required=true)

热度:22   发布时间:2024-01-13 19:56:16.0

在实体类User上添加@Component注解

 

Description:

Field user in com.crab.bookol.controller.UserController required a bean of type 'com.crab.bookol.entity.User' 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.crab.bookol.entity.User' in your configuration.

 

 

最后一行已经给出提示

  相关解决方案