{#========================================== Spincast Config plugin ==========================================#} {% extends "../../layout.html" %} {% block sectionClasses %}plugins hasBreadCrumb 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 %}

Overview

This plugin provides a default implementation for the SpincastConfig interface : SpincastConfigDefault. The implementation is very simple : the default configurations are simply hardcoded.

A small Default Configurations section of the documentation introduces the most important configurations. Also, have a look at the source code of SpincastConfigDefault to see what the default values are.

Finally, notice that if you want to be able to configure your application using a .properties file, you may be interested by the Spincast Properties File Config plugin.

Installation

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>{{spincast.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(AppRequestContext.class, AppWebsocketContext.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...
    }
    
    // ...
}

Javadoc

{% endblock %}