有常量或者Value方法中 使用@AllArgsConstructor会报错 

Consider defining a bean of type 'java.lang.String' in your configuration.

 

解决方案:使用@RequiredArgsConstructor(onConstructor_ = @Autowired)注解

需要被biud的属性,添加final修饰符

更多推荐

Consider defining a bean of type ‘java.lang.String‘ in your configuration spring