
类上有这三个标签:
@Component
@ConfigurationProperties(prefix = "file")
和
@Value("${file.hostname}")
有这个jar包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
类的加载得这样

不能new
网友评论