[FIX] logger dependency error
This commit is contained in:
parent
b71ea1bcd8
commit
1631d1cab9
@ -34,6 +34,11 @@
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.4.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
|
@ -49,15 +49,15 @@ public class WebLauncher {
|
||||
final static Logger LOGGER = LoggerFactory.getLogger(WebLauncher.class);
|
||||
protected UpdateJwtPublicKey keyUpdater = null;
|
||||
protected HttpServer server = null;
|
||||
|
||||
|
||||
public WebLauncher() {
|
||||
ConfigBaseVariable.bdDatabase = "karusic";
|
||||
}
|
||||
|
||||
|
||||
private static URI getBaseURI() {
|
||||
return UriBuilder.fromUri(ConfigBaseVariable.getlocalAddress()).build();
|
||||
}
|
||||
|
||||
|
||||
public void migrateDB() throws Exception {
|
||||
WebLauncher.LOGGER.info("Create migration engine");
|
||||
final MigrationEngine migrationEngine = new MigrationEngine();
|
||||
@ -73,16 +73,16 @@ public class WebLauncher {
|
||||
migrationEngine.migrateWaitAdmin(new DbConfig());
|
||||
WebLauncher.LOGGER.info("Migrate the DB [STOP]");
|
||||
}
|
||||
|
||||
|
||||
public static void main(final String[] args) throws Exception {
|
||||
// Loop-back of logger JDK logging API to SLF4J
|
||||
LogManager.getLogManager().reset();
|
||||
SLF4JBridgeHandler.install();
|
||||
|
||||
|
||||
WebLauncher.LOGGER.info("[START] application wake UP");
|
||||
final WebLauncher launcher = new WebLauncher();
|
||||
launcher.migrateDB();
|
||||
|
||||
|
||||
launcher.process();
|
||||
WebLauncher.LOGGER.info("end-configure the server & wait finish process:");
|
||||
Thread.currentThread().join();
|
||||
@ -90,7 +90,7 @@ public class WebLauncher {
|
||||
launcher.stopOther();
|
||||
WebLauncher.LOGGER.info("STOP the REST server:");
|
||||
}
|
||||
|
||||
|
||||
public void plop(final String aaa) {
|
||||
// List available Image Readers
|
||||
WebLauncher.LOGGER.trace("Available Image Readers:");
|
||||
@ -101,7 +101,7 @@ public class WebLauncher {
|
||||
WebLauncher.LOGGER.trace("Reader CN: " + reader.getOriginatingProvider().getPluginClassName());
|
||||
// ImageIO.deregisterServiceProvider(reader.getOriginatingProvider());
|
||||
}
|
||||
|
||||
|
||||
// List available Image Writers
|
||||
WebLauncher.LOGGER.trace("\nAvailable Image Writers:");
|
||||
final Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName(aaa);
|
||||
@ -111,9 +111,9 @@ public class WebLauncher {
|
||||
WebLauncher.LOGGER.trace("Writer CN: " + writer.getOriginatingProvider().getPluginClassName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void process() throws InterruptedException, DataAccessException {
|
||||
|
||||
|
||||
ImageIO.scanForPlugins();
|
||||
plop("jpeg");
|
||||
plop("png");
|
||||
@ -123,7 +123,7 @@ public class WebLauncher {
|
||||
// Configure resources
|
||||
// ===================================================================
|
||||
final ResourceConfig rc = new ResourceConfig();
|
||||
|
||||
|
||||
// add multipart models ..
|
||||
rc.register(MultiPartFeature.class);
|
||||
// global authentication system
|
||||
@ -143,17 +143,17 @@ public class WebLauncher {
|
||||
rc.register(TrackResource.class);
|
||||
rc.register(DataResource.class);
|
||||
rc.register(ProxyResource.class);
|
||||
|
||||
|
||||
rc.register(HealthCheck.class);
|
||||
rc.register(Front.class);
|
||||
|
||||
|
||||
ContextGenericTools.addJsr310(rc);
|
||||
|
||||
|
||||
// add jackson to be discover when we are ins standalone server
|
||||
rc.register(JacksonFeature.class);
|
||||
// enable this to show low level request
|
||||
// rc.property(LoggingFeature.LOGGING_FEATURE_LOGGER_LEVEL_SERVER, Level.WARNING.getName());
|
||||
|
||||
|
||||
// System.out.println("Connect on the BDD:");
|
||||
// System.out.println(" getDBHost: '" + ConfigVariable.getDBHost() + "'");
|
||||
// System.out.println(" getDBPort: '" + ConfigVariable.getDBPort() + "'");
|
||||
@ -171,13 +171,13 @@ public class WebLauncher {
|
||||
serverLink.shutdownNow();
|
||||
}
|
||||
}, "shutdownHook"));
|
||||
|
||||
|
||||
// ===================================================================
|
||||
// start periodic update of the token ...
|
||||
// ===================================================================
|
||||
this.keyUpdater = new UpdateJwtPublicKey();
|
||||
this.keyUpdater.start();
|
||||
|
||||
|
||||
// ===================================================================
|
||||
// run JERSEY
|
||||
// ===================================================================
|
||||
@ -189,14 +189,14 @@ public class WebLauncher {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void stop() {
|
||||
if (this.server != null) {
|
||||
this.server.shutdownNow();
|
||||
this.server = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void stopOther() {
|
||||
this.keyUpdater.kill();
|
||||
try {
|
||||
|
@ -44,7 +44,7 @@ public class TestBase {
|
||||
|
||||
@Test
|
||||
public static void TestEmpty() throws Exception {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
public class WebLauncherTest extends WebLauncher {
|
||||
final private static Logger LOGGER = LoggerFactory.getLogger(WebLauncherTest.class);
|
||||
|
||||
|
||||
public WebLauncherTest() {}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user