Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

 

(1) 修改配置文件

${安装目录}/maco.war/WEB-INF/classes/clientmode/spring-data-redis.xml


第11行开始将

<bean id="redisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
   <property name="hostName" value="#{redisProp['redis.host']}" />
   <property name="port" value="#{redisProp['redis.port']}" />
</bean>


修改为

<bean id="redisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
   <property name="hostName" value="#{redisProp['redis.host']}" />
   <property name="port" value="#{redisProp['redis.port']}" />
	<!-- Redis数据库和密码 -->
   <property name="database" value="#{redisProp['redis.database']}"/>
   <property name="password" value="#{redisProp['redis.password']}"/>
</bean>



(2) 修改配置文件

${安装目录}/app_home/conf/redis.properties

增加配置:

redis.password=${redis的密码}
redis.database=0

 

(3) 重启应用

 

 









 

 

 

  • No labels