Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. //@ComponentScan("com")
  2. @EnableAutoConfiguration
  3. @EntityScan(basePackages = {"com.ehydromet.entity"})
  4. @SpringBootApplication(scanBasePackages={"com.ehydromet"})// same as @Configuration @EnableAutoConfiguration @ComponentScan
  5. public class SpringBootStandAloneApp extends SpringBootServletInitializer {//implements CommandLineRunner {
  6.  
  7.  
  8. @Override
  9. protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  10. System.out.println("hello");
  11. //return application.sources(SpringBootStandAloneApp.class);
  12. return application;
  13. }
  14. public static void main(String[] args) {
  15. System.out.println("hi");
  16. SpringApplication.run(SpringBootStandAloneApp.class, args);
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement