Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RunWith(SpringRunner.class)
- @ActiveProfile(profiles = "test") // A "application-test.yml" exists in test resource.
- @ImportAutoConfiguration(classes = ConfigurationPropertiesAutoConfiguration.class)
- @SpringBootTest(classes = YourConfigBeanClass.class)
- public xxxTest {
- @Autowired private YourConfigBeanClass target;
- @Test
- public void doSomeTest() {
- // test target.
- }
- }
Add Comment
Please, Sign In to add comment