Skip to content

Configuration

yzhang921 edited this page Dec 20, 2016 · 1 revision

Server side config.properties

# configuration connection of meta data
validationQuery=SELECT 1
jdbc_url=jdbc:mysql://localhost:3306/cboard
jdbc_username=root
jdbc_password=111111

# Service configuration
# not recommended to change
dataprovider.resultLimit=300000

Spring configuration

spring.xml cache type Redis/JVM

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
>
    <context:property-placeholder location="classpath:*.properties"/>
    <context:component-scan base-package="org.cboard"/>
    <bean class="org.cboard.cache.HeapCacheManager"/>
    <!--<import resource="spring-redis.xml"/>-->
</beans>

spring-redis.xml redis relate config

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
>

    <bean class="org.cboard.cache.RedisCacheManager">
        <property name="redisTemplate">
            <bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
                <property name="connectionFactory">
                    <bean class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
                          p:hostName="127.0.0.1"
                          p:port="6379" p:usePool="true"/>
                </property>
                <property name="keySerializer">
                    <bean class="org.springframework.data.redis.serializer.StringRedisSerializer"/>
                </property>
            </bean>
        </property>
    </bean>
</beans>

Front-end Settings.js

CBoard\src\main\webapp\org\cboard\Settings.js

/**
 * Created by Peter on 2016/10/23.
 */
// CBoard settings
var settings = {
    preferredLanguage: "en" // en/cn: Switch language to Chinese
}
Clone this wiki locally