| .gitignore | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| CenterService/src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| CommonService/src/main/java/com/java110/base/dao/impl/CommonServiceDaoImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| java110-cacheAgent/src/main/java/com/java110/cache/RedisConfiguration.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| java110-common/src/main/java/com/java110/common/cache/BaseCache.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| java110-config/src/main/resources/config/center_event.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| java110-config/src/main/resources/logback.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| java110-core/src/main/java/com/java110/core/base/dao/BaseServiceDao.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.gitignore
@@ -22,4 +22,5 @@ hs_err_pid* .idea logs *.iml CenterService/src/main/java/com/java110/center/CenterServiceApplicationStart.java
@@ -19,7 +19,7 @@ * @date 2016年8月6日 * @tag */ @SpringBootApplication(scanBasePackages={"com.java110.service","com.java110.order","com.java110.core","com.java110.event.center"}) @SpringBootApplication(scanBasePackages={"com.java110.service","com.java110.center","com.java110.core","com.java110.event.center","com.java110.cache"}) @EnableDiscoveryClient //@EnableConfigurationProperties(EventProperties.class) public class CenterServiceApplicationStart { CenterService/src/main/resources/application.yml
@@ -4,8 +4,8 @@ maxTotal: 100 maxIdle: 20 maxWaitMillis: 20000 host: 127.0.0.1 port: 3306 host: 192.168.31.199 port: 6379 eureka: client: @@ -16,13 +16,23 @@ spring: application: name: center-service redis: database: 0 host: 192.168.31.199 port: 6379 pool: max-active: 8 max-wait: -1 max-idle: 8 min-idle: 0 timeout: 0 #============== kafka =================== kafka: consumer: zookeeper: connect: 10.93.21.21:2181 servers: 10.93.21.21:9092 connect: 192.168.31.199:2181 servers: 192.168.31.199:9092 enable: auto: commit: true @@ -39,11 +49,10 @@ concurrency: 10 producer: servers: 10.93.21.21:9092 servers: 192.168.31.199:9092 retries: 0 batch: size: 4096 linger: 1 buffer: memory: 40960 memory: 40960 CommonService/src/main/java/com/java110/base/dao/impl/CommonServiceDaoImpl.java
@@ -31,6 +31,7 @@ @Cacheable(key= "CodeMappingAll") public List<CodeMapping> getCodeMappingAll() throws Exception{ Jedis jedis = jedisPool.getResource(); List<CodeMapping> codeMappings = null; if(jedis.exists("CodeMappingAll".getBytes())){ codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingAll".getBytes()),CodeMapping.class); java110-cacheAgent/src/main/java/com/java110/cache/RedisConfiguration.java
@@ -15,7 +15,7 @@ @Configuration public class RedisConfiguration extends CachingConfigurerSupport { @Bean(name= "jedis.pool") @Bean(name= "jedisPool") @Autowired public JedisPool jedisPool(@Qualifier("jedis.pool.config") JedisPoolConfig config, @Value("${jedis.pool.host}")String host, java110-common/src/main/java/com/java110/common/cache/BaseCache.java
@@ -11,7 +11,7 @@ public class BaseCache { protected static Jedis getJedis(){ JedisPool jedisPool = (JedisPool) ApplicationContextFactory.getBean("jedis.pool"); JedisPool jedisPool = (JedisPool) ApplicationContextFactory.getBean("jedisPool"); return jedisPool.getResource(); } java110-config/src/main/resources/config/center_event.properties
@@ -4,4 +4,4 @@ java110.event.properties.centerServiceEvent=\ save.userService.userInfo::com.java110.event.center.user.event.DataFlowCustEvent,\ save.merchantService.merchantInfo::com.java110.event.center.user.event.DataFlowMerchantEvent save.merchantService.merchantInfo::com.java110.event.center.merchant.event.DataFlowMerchantEvent java110-config/src/main/resources/logback.xml
@@ -4,9 +4,9 @@ <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>./logs/app.log</File> <File>logs/app.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${LOG_PATH}/info-%d{yyyyMMdd}.log.%i</fileNamePattern> <fileNamePattern>logs/info-%d{yyyyMMdd}.log.%i</fileNamePattern> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>500MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> @@ -22,7 +22,7 @@ <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> <File>${LOG_PATH}/error.log</File> <File>logs/error.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${LOG_PATH}/error-%d{yyyyMMdd}.log.%i </fileNamePattern> @@ -39,4 +39,5 @@ </appender> <logger name="org.springframework.web" level="INFO_FILE"/> <logger name="com.java110" level="INFO_FILE"/> </configuration> java110-core/src/main/java/com/java110/core/base/dao/BaseServiceDao.java
@@ -21,7 +21,8 @@ public class BaseServiceDao extends AppBase { @Autowired protected JedisPool jedisPool; protected JedisPool jedisPool; @Autowired protected SqlSessionTemplate sqlSessionTemplate; @@ -33,14 +34,6 @@ public void setSessionTemplate(SqlSessionTemplate sqlSessionTemplate) { this.sqlSessionTemplate = sqlSessionTemplate; } public JedisPool getJedisPool() { return jedisPool; } public void setJedisPool(JedisPool jedisPool) { this.jedisPool = jedisPool; } private final static String SERVICE_CASE_JSON_EXCEPTION = "101";//转json异常 @@ -106,4 +99,12 @@ } return reqMap; } public JedisPool getJedisPool() { return jedisPool; } public void setJedisPool(JedisPool jedisPool) { this.jedisPool = jedisPool; } }