deployment damaged fixed

This commit is contained in:
Jörg Henke
2026-01-15 18:16:43 +01:00
parent c5604d3ce8
commit 9699032250

View File

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