mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Test commit - sync between machines
This commit is contained in:
@ -594,6 +594,7 @@ public abstract class QRecordEntity
|
||||
{
|
||||
Field tableNameField = entityClass.getDeclaredField("TABLE_NAME");
|
||||
String tableNameValue = (String) tableNameField.get(null);
|
||||
|
||||
return (tableNameValue);
|
||||
}
|
||||
catch(Exception e)
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
<!-- When updating to javalin 6.3.0, we received classNotFound errors - which this fixed. -->
|
||||
<kotlin.version>1.9.10</kotlin.version>
|
||||
<javalin.version>6.3.0</javalin.version>
|
||||
<javalin.version>6.6.0</javalin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -117,6 +117,12 @@
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.kingsrook.qqq</groupId>
|
||||
<artifactId>qqq-middleware-api</artifactId>
|
||||
<version>0.26.0-integration-20250615-161253</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -26,6 +26,7 @@ import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import com.kingsrook.qqq.api.javalin.QJavalinApiHandler;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||
import com.kingsrook.qqq.backend.core.exceptions.QInstanceValidationException;
|
||||
import com.kingsrook.qqq.backend.core.instances.AbstractQQQApplication;
|
||||
@ -76,7 +77,8 @@ public class QApplicationJavalinServer
|
||||
private boolean serveFrontendMaterialDashboard = true;
|
||||
private String frontendMaterialDashboardHostedPath = "/"; // TODO - Things like this should be moved into a central configuration file system, so that it can be changed in userspace without code changes.
|
||||
private boolean serveLegacyUnversionedMiddlewareAPI = true;
|
||||
private List<AbstractMiddlewareVersion> middlewareVersionList = List.of(new MiddlewareVersionV1());
|
||||
private boolean serveApplicationApi = true;
|
||||
private List<AbstractMiddlewareVersion> middlewareVersionList = List.of(new MiddlewareVersionV1()); // TODO - Seems like this should be null by default, and only set if the application developer wants to serve versioned middleware APIs. @DK
|
||||
private List<QJavalinRouteProvider> additionalRouteProviders = null;
|
||||
private Consumer<Javalin> javalinConfigurationCustomizer = null;
|
||||
private QJavalinMetaData javalinMetaData = null;
|
||||
@ -170,6 +172,20 @@ public class QApplicationJavalinServer
|
||||
}
|
||||
}
|
||||
|
||||
if(serveApplicationApi)
|
||||
{
|
||||
try
|
||||
{
|
||||
QJavalinApiHandler qJavalinApiHandler = new QJavalinApiHandler(qInstance);
|
||||
config.router.apiBuilder(qJavalinApiHandler.getRoutes());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
LOG.error("Unable to add application API routes to Javalin service.", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
// versioned qqq middleware routes //
|
||||
/////////////////////////////////////
|
||||
@ -738,4 +754,35 @@ public class QApplicationJavalinServer
|
||||
{
|
||||
this.frontendMaterialDashboardHostedPath = frontendMaterialDashboardHostedPath;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for serveApplicationApi
|
||||
*******************************************************************************/
|
||||
public boolean getServeApplicationApi()
|
||||
{
|
||||
return (this.serveApplicationApi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for serveApplicationApi
|
||||
*******************************************************************************/
|
||||
public void setServeApplicationApi(boolean serveApplicationApi)
|
||||
{
|
||||
this.serveApplicationApi = serveApplicationApi;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for serveApplicationApi
|
||||
*******************************************************************************/
|
||||
public QApplicationJavalinServer withServeApplicationApi(boolean serveApplicationApi)
|
||||
{
|
||||
this.serveApplicationApi = serveApplicationApi;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user