CWForward4109215
2019-07-30 17:06
类:
@Component
@ConfigurationProperties(prefix = "com.example.opensource")
@PropertySource(value = "classpath:resource.properties")
public class Resource {
private String name;
private String website;
private String language;
错误描述
Description:
Field resource in com.example.controller.HelloController required a bean of type 'com.example.pojo.Resource' 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.example.pojo.Resource' in your configuration.
这个问题是因为启动类 要放到最外边
SpringBoot开发常用技术整合
102174 学习 · 508 问题
相似问题