Package com.marklogic.client.ext.spring
Class BasicConfig
- java.lang.Object
-
- com.marklogic.client.ext.spring.BasicConfig
-
@Configuration @PropertySource(value="file:gradle.properties", ignoreResourceNotFound=true) public class BasicConfig extends java.lang.ObjectProvides 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 Summary
Constructors Constructor Description BasicConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringbuildContentDatabaseName(java.lang.String mlAppName)Used for building an XccTemplate; can be overridden when this method's assumption about the name isn't true.DatabaseClientConfigdatabaseClientConfig()DatabaseClientProviderdatabaseClientProvider()java.lang.StringgetMlAppName()java.lang.StringgetMlHost()java.lang.StringgetMlPassword()java.lang.IntegergetMlRestPort()java.lang.StringgetMlUsername()protected java.lang.IntegergetRestPort()static org.springframework.context.support.PropertySourcesPlaceholderConfigurerpropertyConfigurer()Has to be static so that Spring instantiates it first.voidsetMlAppName(java.lang.String mlAppName)XccTemplatexccTemplate()
-
-
-
Method Detail
-
propertyConfigurer
@Bean public static org.springframework.context.support.PropertySourcesPlaceholderConfigurer propertyConfigurer()
Has to be static so that Spring instantiates it first.
-
databaseClientConfig
@Bean public DatabaseClientConfig databaseClientConfig()
-
xccTemplate
@Bean public XccTemplate xccTemplate()
-
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.
-
databaseClientProvider
@Bean public DatabaseClientProvider databaseClientProvider()
-
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)
-
-