Class BasicConfig


  • @Configuration
    @PropertySource(value="file:gradle.properties",
                    ignoreResourceNotFound=true)
    public class BasicConfig
    extends java.lang.Object
    Provides a basic configuration for Spring-based applications. Assumes that properties can be found in the gradle.properties file, though that file does not need to exist - this can be subclassed and a different property source can be used. And since this is using Spring's Value annotation, system properties can be used to set all of the property values as well. For ML8, this now assumes that the XDBC server on port 8000 will be used, in which case in order to create an XccTemplate, it needs to know the application name.
    • Constructor Detail

      • BasicConfig

        public BasicConfig()
    • Method Detail

      • propertyConfigurer

        @Bean
        public static org.springframework.context.support.PropertySourcesPlaceholderConfigurer propertyConfigurer()
        Has to be static so that Spring instantiates it first.
      • buildContentDatabaseName

        protected java.lang.String buildContentDatabaseName​(java.lang.String mlAppName)
        Used for building an XccTemplate; can be overridden when this method's assumption about the name isn't true.
      • getRestPort

        protected java.lang.Integer getRestPort()
      • getMlUsername

        public java.lang.String getMlUsername()
      • getMlPassword

        public java.lang.String getMlPassword()
      • getMlHost

        public java.lang.String getMlHost()
      • getMlRestPort

        public java.lang.Integer getMlRestPort()
      • getMlAppName

        public java.lang.String getMlAppName()
      • setMlAppName

        public void setMlAppName​(java.lang.String mlAppName)