rev:去除jetcache框架(存在bug)
This commit is contained in:
@@ -334,18 +334,6 @@
|
||||
<artifactId>commons-configuration</artifactId>
|
||||
<version>${configuration.version}</version>
|
||||
</dependency>
|
||||
<!-- ****************** -->
|
||||
<dependency>
|
||||
<groupId>com.alicp.jetcache</groupId>
|
||||
<artifactId>jetcache-starter-redis</artifactId>
|
||||
<version>2.7.3</version>
|
||||
</dependency>
|
||||
<!-- jetcache2.7.x版本需要额外添加该依赖-->
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>4.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package org.nl;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
|
||||
import com.alicp.jetcache.anno.config.EnableMethodCache;
|
||||
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
@@ -30,8 +28,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
})
|
||||
@ServletComponentScan //https://blog.csdn.net/qq_36850813/article/details/101194250
|
||||
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
|
||||
@EnableMethodCache(basePackages = "org.nl")
|
||||
@EnableCreateCacheAnnotation
|
||||
@MapperScan("org.nl.**.mapper")
|
||||
public class AppRun {
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@ package org.nl.system.service.param.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alicp.jetcache.anno.CachePenetrationProtect;
|
||||
import com.alicp.jetcache.anno.CacheType;
|
||||
import com.alicp.jetcache.anno.CacheUpdate;
|
||||
import com.alicp.jetcache.anno.Cached;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -15,8 +11,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.system.service.param.dao.Param;
|
||||
import org.nl.system.service.param.dao.mapper.SysParamMapper;
|
||||
@@ -77,7 +73,6 @@ public class SysParamServiceImpl extends ServiceImpl<SysParamMapper, Param> impl
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheUpdate(name="paramCache-", key="#param.code", value="#param")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(Param param) {
|
||||
Param paramObj = paramMapper.selectById(param.getId());
|
||||
@@ -102,8 +97,6 @@ public class SysParamServiceImpl extends ServiceImpl<SysParamMapper, Param> impl
|
||||
}
|
||||
|
||||
@Override
|
||||
@CachePenetrationProtect
|
||||
@Cached(name="paramCache-",key = "#code", expire = 3600, cacheType = CacheType.REMOTE)
|
||||
public Param findByCode(String code) {
|
||||
QueryWrapper<Param> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("code", code);
|
||||
|
||||
@@ -26,7 +26,6 @@ public class AcsUtil {
|
||||
String isConnect = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("is_connect_acs").getValue();
|
||||
JSONObject result = new JSONObject();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "下发成功,但未连接ACS!");
|
||||
result.put("data", new JSONObject());
|
||||
@@ -62,7 +61,6 @@ public class AcsUtil {
|
||||
String msg = e.getMessage();
|
||||
//ConnectException: Connection refused: connect
|
||||
//网络不通
|
||||
System.out.println(msg);
|
||||
result.put("status", HttpStatus.BAD_REQUEST);
|
||||
result.put("message", "网络不通,操作失败!");
|
||||
result.put("data", new JSONObject());
|
||||
@@ -129,7 +127,6 @@ public class AcsUtil {
|
||||
String msg = e.getMessage();
|
||||
//ConnectException: Connection refused: connect
|
||||
//网络不通
|
||||
System.out.println(msg);
|
||||
result.put("status", HttpStatus.BAD_REQUEST);
|
||||
result.put("message", "网络不通,操作失败!");
|
||||
result.put("data", new JSONObject());
|
||||
|
||||
@@ -158,26 +158,6 @@ mybatis-plus:
|
||||
db-config:
|
||||
id-type: INPUT
|
||||
banner: false
|
||||
jetcache:
|
||||
statIntervalMinutes: 15
|
||||
areaInCacheName: false
|
||||
local:
|
||||
default:
|
||||
type: linkedhashmap
|
||||
keyConvertor: fastjson
|
||||
remote:
|
||||
default:
|
||||
type: redis
|
||||
keyConvertor: fastjson2
|
||||
broadcastChannel: projectA
|
||||
valueEncoder: java
|
||||
valueDecoder: java
|
||||
poolConfig:
|
||||
minIdle: 5
|
||||
maxIdle: 20
|
||||
maxTotal: 50
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
lucene:
|
||||
index:
|
||||
path: D:\log\lms\lucene\index
|
||||
|
||||
Reference in New Issue
Block a user