新建指定配置类TestConfiguration
该类需要的注解:
@Configuration
@ConfigurationProperties(prefix="test")
@PropertySource("classpath:test.properties")
同时启动类上需要增加注解:
@EnableConfigurationProperties({TestConfiguration.class})
新建指定配置类TestConfiguration
该类需要的注解:
@Configuration
@ConfigurationProperties(prefix="test")
@PropertySource("classpath:test.properties")
同时启动类上需要增加注解:
@EnableConfigurationProperties({TestConfiguration.class})