@@ -8,8 +8,6 @@ import org.springframework.stereotype.Component; | |||||
@ConfigurationProperties(prefix = "smtweb.bpm") | @ConfigurationProperties(prefix = "smtweb.bpm") | ||||
@Data | @Data | ||||
public class BpmConfigBean { | public class BpmConfigBean { | ||||
// 是否debug模式 | |||||
private boolean debug; | |||||
private String codeJavaPath; | private String codeJavaPath; | ||||
private int mode; | private int mode; | ||||
} | } |
@@ -20,7 +20,6 @@ smtweb: | |||||
#ftp 密码 | #ftp 密码 | ||||
attach-ftp-pwd: Bjjt@2021 | attach-ftp-pwd: Bjjt@2021 | ||||
bpm: | bpm: | ||||
debug: true | |||||
# 有.idea或pom.xml文件的目录 | # 有.idea或pom.xml文件的目录 | ||||
code-java-path: 'd:/work/smtweb2/smtweb-framework' | code-java-path: 'd:/work/smtweb2/smtweb-framework' | ||||
# 读取模式 1-读取pom.xml,要求module名同目录 2-读取.idea/modules.xml | # 读取模式 1-读取pom.xml,要求module名同目录 2-读取.idea/modules.xml | ||||
@@ -20,7 +20,7 @@ public class CoreAutoConfiguration { | |||||
*/ | */ | ||||
@Value("${smtweb.machine-id}") | @Value("${smtweb.machine-id}") | ||||
private int machineId; | private int machineId; | ||||
@Bean | @Bean | ||||
public IdGenerator idGenerator() { | public IdGenerator idGenerator() { | ||||
return new IdGenerator(machineId); | return new IdGenerator(machineId); | ||||
@@ -1,5 +1,6 @@ | |||||
package cc.smtweb.framework.core.cache; | package cc.smtweb.framework.core.cache; | ||||
import cc.smtweb.framework.core.CoreAutoConfiguration; | |||||
import cc.smtweb.framework.core.annotation.SwCache; | import cc.smtweb.framework.core.annotation.SwCache; | ||||
import cc.smtweb.framework.core.cache.redis.RedisBroadcastEvent; | import cc.smtweb.framework.core.cache.redis.RedisBroadcastEvent; | ||||
import cc.smtweb.framework.core.cache.redis.RedisManager; | import cc.smtweb.framework.core.cache.redis.RedisManager; | ||||
@@ -27,7 +28,6 @@ import java.util.concurrent.TimeUnit; | |||||
*/ | */ | ||||
@Slf4j | @Slf4j | ||||
public abstract class AbstractCache<T extends Serializable> implements ISwCache<String, T> { | public abstract class AbstractCache<T extends Serializable> implements ISwCache<String, T> { | ||||
protected final static int LS_NONE = 0; | protected final static int LS_NONE = 0; | ||||
protected final static int LS_LOADING = 1; | protected final static int LS_LOADING = 1; | ||||
protected final static int LS_LOADED = 2; | protected final static int LS_LOADED = 2; | ||||
@@ -110,7 +110,7 @@ public abstract class AbstractCache<T extends Serializable> implements ISwCache< | |||||
* 否则,非lazy,从数据库加载,并更新redis | * 否则,非lazy,从数据库加载,并更新redis | ||||
*/ | */ | ||||
protected void init() { | protected void init() { | ||||
if (RedisManager.getInstance().exists(getIdent())) { | |||||
if (!SwConsts.SYS_DEBUG && RedisManager.getInstance().exists(getIdent())) { | |||||
log.info("从redis同步缓存!(" + getTitle() + ")"); | log.info("从redis同步缓存!(" + getTitle() + ")"); | ||||
//从缓存服务器下载到本地 | //从缓存服务器下载到本地 | ||||
syncCache(); | syncCache(); | ||||
@@ -4,6 +4,8 @@ package cc.smtweb.framework.core.common; | |||||
* Created by Akmm at 2022/3/23 9:46 | * Created by Akmm at 2022/3/23 9:46 | ||||
*/ | */ | ||||
public interface SwConsts { | public interface SwConsts { | ||||
//开发调试模式 | |||||
boolean SYS_DEBUG = true; | |||||
int DEFAULT_ORDER = 1; | int DEFAULT_ORDER = 1; | ||||
//缓存中:树节点按parent的key | //缓存中:树节点按parent的key | ||||
String KEY_PARENT_ID = "pr"; | String KEY_PARENT_ID = "pr"; | ||||