{#========================================== Spincast Config plugin ==========================================#} {% extends "../../layout.html" %} {% block sectionClasses %}plugins plugins-spincast-config{% endblock %} {% block meta_title %}Plugins - Spincast Config{% endblock %} {% block meta_description %}Spincast Config plugin provides the default configurations required by Spincast.{% endblock %} {% block scripts %} {% endblock %} {% block body %}
The Spincast Config plugin provides an implementation
of the ISpincastConfig interface to provide default
values to the configurations required by Spincast.
The current implementation is very simple: the values are simply hardcoded.
If you use the spincast-default artifact, this plugin is already installed so
you have nothing more to do!
If you start from scratch using the spincast-core artifact, you can use the
plugin by adding this artifact to your project:
<dependency>
<groupId>org.spincast</groupId>
<artifactId>spincast-plugins-config</artifactId>
<version>{{spincastCurrrentVersion}}</version>
</dependency>
You then install the plugin's Guice module, by passing it to the Guice.createInjector(...) method:
Injector guice = Guice.createInjector(
new SpincastCoreGuiceModule(args),
new SpincastConfigPluginGuiceModule(IAppRequestContext.class, IAppWebsocketContext.class)
// other modules...
);
... or by using the install(...) method from your custom Guice module:
public class AppModule extends SpincastCoreGuiceModule {
@Override
protected void configure() {
super.configure();
install(new SpincastConfigPluginGuiceModule(getRequestContextType(),
getWebsocketContextType()));
// other modules...
}
// ...
}
ISpincastConfig interface
boolean isDebugEnabled()
true on development environment,
where errors can be publicly displayed, where cache can
be disabled, etc. In production set it to false
true.
String getServerHost()
0.0.0.0.
int getHttpServerPort()
44419 so HTTP
is enabled by default.
int getHttpsServerPort()
-1 so HTTPS
is not enabled by default.
String getHttpsKeyStorePath()
KeyStore, for SSL. Can be a
classpath path or and absolute path.
getHttpsServerPort() returns a port > 0.
null.
String getHttpsKeyStoreType()
KeyStore, for SSL.
getHttpsServerPort() returns a port > 0.
null.
String getHttpsKeyStoreStorePass()
KeyStore, for SSL.
getHttpsServerPort() returns a port > 0.
null.
String getHttpsKeyStoreKeypass()
KeyStore, for SSL.
getHttpsServerPort() returns a port > 0.
null.
boolean isRoutesCaseSensitive()
false.
String getEnvironmentName()
local.
long getServerMaxRequestBodyBytes()
104857600 (100MB).
List<String> getContentTypesToSkipGziping()
File getSpincastWritableDir()
System.getProperty("java.io.tmpdir")
to create a temporary directory.
Locale getDefaultLocale()
Locale.US.
int getRouteForwardingMaxNumber()
2.