cleanup up main class
This commit is contained in:
parent
87783f2463
commit
796d4ae032
@ -11,46 +11,16 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
|
|||||||
import org.springframework.cache.annotation.EnableCaching;
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
//@EnableCaching
|
|
||||||
public class ChattoApplication extends SpringBootServletInitializer {
|
public class ChattoApplication extends SpringBootServletInitializer {
|
||||||
|
|
||||||
|
|
||||||
// @Value("${spring.datasource.url}")
|
|
||||||
// private static String url;
|
|
||||||
|
|
||||||
public static void main(String[] args) throws SQLException {
|
public static void main(String[] args) throws SQLException {
|
||||||
SpringApplication application = new SpringApplication(ChattoApplication.class);
|
SpringApplication application = new SpringApplication(ChattoApplication.class);
|
||||||
addInitHooks(application);
|
application.run();
|
||||||
// SpringApplication.run(ChattoApplication.class, args);
|
|
||||||
application.run(args);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||||
return application.sources(ChattoApplication.class);
|
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<Application> applicationClass = Application.class;
|
|
||||||
//}
|
|
Loading…
Reference in New Issue
Block a user