@Component //@Configuration //@ConfigurationProperties(prefix = "config") @PropertySource("classpath:config.properties") //@PropertySource(value = {"config.properties"}) @ConfigurationProperties(prefix = "config") @Data public class ConfigBean { // boss线程 @Value("${config.bossCount}") private Integer bossCount;