SHARE
TWEET

Untitled

a guest Jan 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top