From 796d4ae03242e4ed238754a39b1db3895ab8808a Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Thu, 21 Nov 2019 23:48:32 +0530 Subject: [PATCH] cleanup up main class --- .../org/ros/chatto/ChattoApplication.java | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/chatto/src/main/java/org/ros/chatto/ChattoApplication.java b/chatto/src/main/java/org/ros/chatto/ChattoApplication.java index e25052c..c2f4909 100644 --- a/chatto/src/main/java/org/ros/chatto/ChattoApplication.java +++ b/chatto/src/main/java/org/ros/chatto/ChattoApplication.java @@ -11,46 +11,16 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer import org.springframework.cache.annotation.EnableCaching; @SpringBootApplication -//@EnableCaching public class ChattoApplication extends SpringBootServletInitializer { - -// @Value("${spring.datasource.url}") -// private static String url; - public static void main(String[] args) throws SQLException { SpringApplication application = new SpringApplication(ChattoApplication.class); - addInitHooks(application); -// SpringApplication.run(ChattoApplication.class, args); - application.run(args); - - - + application.run(); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(ChattoApplication.class); } - static void addInitHooks(SpringApplication application) throws SQLException { - // TBD … -// System.out.println("Hello world very loooooooooooooooooooooooooooooooooooooong string"); -// String url = environment.getProperty("spring.datasource.url"); -// System.out.println("URL = " + url); - - } -} -//public class Application extends SpringBootServletInitializer { -// -// public static void main(String[] args) { -// SpringApplication.run(applicationClass, args); -// } -// -// @Override -// protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { -// return application.sources(applicationClass); -// } -// -// private static Class applicationClass = Application.class; -//} \ No newline at end of file +} \ No newline at end of file