|
@@ -1,5 +1,7 @@
|
|
package com.kmall.manager.manager.redis;
|
|
package com.kmall.manager.manager.redis;
|
|
|
|
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Bean;
|
|
@@ -12,6 +14,7 @@ import org.springframework.stereotype.Component;
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
public class JedisPropertiesConfiguration {
|
|
public class JedisPropertiesConfiguration {
|
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(JedisPropertiesConfiguration.class);
|
|
private static final String PROD = "prod";
|
|
private static final String PROD = "prod";
|
|
private static final String DEV = "dev";
|
|
private static final String DEV = "dev";
|
|
|
|
|
|
@@ -26,6 +29,9 @@ public class JedisPropertiesConfiguration {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
public JedisProperties jedisProperties(){
|
|
public JedisProperties jedisProperties(){
|
|
|
|
+ logger.info("Redis使用环境:{}",evn);
|
|
|
|
+ logger.info("jedisProdProperties初始化:{}",jedisProdProperties);
|
|
|
|
+ logger.info("jedisDevProperties初始化:{}",jedisDevProperties);
|
|
if (evn.equalsIgnoreCase(PROD)) {
|
|
if (evn.equalsIgnoreCase(PROD)) {
|
|
return jedisProdProperties;
|
|
return jedisProdProperties;
|
|
}else {
|
|
}else {
|