Guest User

Untitled

a guest
Jan 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @RunWith(SpringRunner.class)
  2. @ActiveProfile(profiles = "test") // A "application-test.yml" exists in test resource.
  3. @ImportAutoConfiguration(classes = ConfigurationPropertiesAutoConfiguration.class)
  4. @SpringBootTest(classes = YourConfigBeanClass.class)
  5. public xxxTest {
  6. @Autowired private YourConfigBeanClass target;
  7.  
  8. @Test
  9. public void doSomeTest() {
  10. // test target.
  11. }
  12. }
Add Comment
Please, Sign In to add comment