Skip to content

配置项

yzhang921 edited this page Dec 15, 2016 · 1 revision

服务端配置config.properties

# 配置元数据库连接项
validationQuery=SELECT 1
jdbc_url=jdbc:mysql://localhost:3306/cboard
jdbc_username=root
jdbc_password=111111

# Service configuration
# 配置query返回前端数据集大小限制,不建议更改,30W已经对浏览器有很大压力了
dataprovider.resultLimit=300000

Spring相关配置

spring.xml 缓存类型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连接

<?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>

前端配置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