| .. | .. |
|---|
| 32 | 32 |
|
|---|
| 33 | 33 | public class MainApp {
|
|---|
| 34 | 34 |
|
|---|
| 35 | | - static final Logger log = LogManager.getLogger(MainApp.class);
|
|---|
| 35 | + private static final Logger LOG = LogManager.getLogger(MainApp.class);
|
|---|
| 36 | 36 |
|
|---|
| 37 | 37 | private static Server server;
|
|---|
| 38 | 38 | private static Injector injector = null;
|
|---|
| .. | .. |
|---|
| 42 | 42 | private URI uri;
|
|---|
| 43 | 43 |
|
|---|
| 44 | 44 | public static void main(String[] args) throws Exception {
|
|---|
| 45 | | - log.info("SeCuris init...");
|
|---|
| 45 | + LOG.info("SeCuris init...");
|
|---|
| 46 | 46 |
|
|---|
| 47 | 47 | SecurisModule securisModule = new SecurisModule();
|
|---|
| 48 | 48 | JpaPersistModule jpaPersistModule = new JpaPersistModule("localdb");
|
|---|
| 49 | 49 | Properties props = new Properties();
|
|---|
| 50 | 50 | props.put("javax.persistence.jdbc.password", securisModule.getPassword());
|
|---|
| 51 | 51 | props.put("javax.persistence.jdbc.url", securisModule.getUrl(securisModule.getAppDir()));
|
|---|
| 52 | | - log.info("BD Url: {} {}", securisModule.getUrl(securisModule.getAppDir()), securisModule.getPassword());
|
|---|
| 52 | + LOG.info("BD Url: {} {}", securisModule.getUrl(securisModule.getAppDir()), securisModule.getPassword());
|
|---|
| 53 | 53 | jpaPersistModule.properties(props);
|
|---|
| 54 | 54 |
|
|---|
| 55 | 55 | injector = Guice.createInjector(securisModule, new RequestsModule(), jpaPersistModule);
|
|---|
| .. | .. |
|---|
| 91 | 91 | // errorHandler.addErrorPage(javax.ws.rs.ForbiddenException.class, "/");
|
|---|
| 92 | 92 | // errorHandler.addErrorPage(javax.ws.rs.ForbiddenException.class.getCanonicalName(), "/");
|
|---|
| 93 | 93 | // errorHandler.addErrorPage(ErrorPageErrorHandler.GLOBAL_ERROR_PAGE, "/");
|
|---|
| 94 | | - log.info("Error Handlers: " + context.getErrorHandler());
|
|---|
| 94 | + LOG.info("Error Handlers: " + context.getErrorHandler());
|
|---|
| 95 | 95 | ContextHandlerCollection contexts = new ContextHandlerCollection();
|
|---|
| 96 | 96 |
|
|---|
| 97 | 97 | contexts.setHandlers(new Handler[]
|
|---|
| .. | .. |
|---|
| 101 | 101 | server.setHandler(context);
|
|---|
| 102 | 102 | server.start();
|
|---|
| 103 | 103 | server.join();
|
|---|
| 104 | | - log.info("Started server in: http://127.0.0.1:9997/");
|
|---|
| 104 | + LOG.info("Started server in: http://127.0.0.1:9997/");
|
|---|
| 105 | 105 | }
|
|---|
| 106 | 106 |
|
|---|
| 107 | 107 | }
|
|---|