Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SpringBootApplication
- @EnableDiscoveryClient
- public class Application {
- private static final Logger LOGGER = LoggerFactory.getLogger(Application.class);
- public static void main(String[] args) {
- LOGGER.info("Starting Application");
- ConfigurableApplicationContext context = new SpringApplicationBuilder(Application.class)
- .properties("spring.config.name:application,db-config")
- .build().run(args);
- ConfigurableEnvironment environment = context.getEnvironment();
- LOGGER.info("OpendoorServiceApplication config file loaded successfully: {}", environment.getProperty("spring.application.name"));
- LOGGER.info("Database config file loaded successfully: {}", environment.getProperty("mes.db.environment"));
- }
- }
- @RunWith(SpringRunner.class)
- @SpringBootTest(classes=Application.class)
- public class ApplicationTests {
- @Test
- public void applicationContextLoaded() {
- }
- }
Add Comment
Please, Sign In to add comment