deployment damaged fixed
This commit is contained in:
@@ -23,16 +23,17 @@ public class Main extends SpringBootServletInitializer {
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||
ConfigurableApplicationContext context = builder.run();
|
||||
DSLContext jooq = context.getBean(DSLContext.class);
|
||||
Integer foundDbVersion = null;
|
||||
try {
|
||||
foundDbVersion = jooq.selectFrom(V_VERSION).fetchOne(V_VERSION.VERSION);
|
||||
} catch (DataAccessException e) {
|
||||
String msg = String.format("Wrong database version found; %d is required, but found %d", requiredDbVersion,
|
||||
foundDbVersion);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
// deactivated; damages deployment...
|
||||
// ConfigurableApplicationContext context = builder.run();
|
||||
// DSLContext jooq = context.getBean(DSLContext.class);
|
||||
// Integer foundDbVersion = null;
|
||||
// try {
|
||||
// foundDbVersion = jooq.selectFrom(V_VERSION).fetchOne(V_VERSION.VERSION);
|
||||
// } catch (DataAccessException e) {
|
||||
// String msg = String.format("Wrong database version found; %d is required, but found %d", requiredDbVersion,
|
||||
// foundDbVersion);
|
||||
// throw new RuntimeException(msg);
|
||||
// }
|
||||
return builder.sources(Main.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user