优化一些细节
This commit is contained in:
@ -36,6 +36,7 @@ public class ScheduleConfig
|
||||
prop.put("org.quartz.jobStore.isClustered", "true");
|
||||
prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
|
||||
prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
|
||||
prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
|
||||
|
||||
prop.put("org.quartz.jobStore.misfireThreshold", "12000");
|
||||
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
|
||||
|
@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.shiro.realm.UserRealm;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSessionFactory;
|
||||
@ -87,9 +88,18 @@ public class ShiroConfig
|
||||
@Bean
|
||||
public EhCacheManager getEhCacheManager()
|
||||
{
|
||||
net.sf.ehcache.CacheManager cacheManager = net.sf.ehcache.CacheManager.getCacheManager("ruoyi");
|
||||
EhCacheManager em = new EhCacheManager();
|
||||
em.setCacheManagerConfigFile("classpath:ehcache/ehcache-shiro.xml");
|
||||
return em;
|
||||
if (StringUtils.isNull(cacheManager))
|
||||
{
|
||||
em.setCacheManagerConfigFile("classpath:ehcache/ehcache-shiro.xml");
|
||||
return em;
|
||||
}
|
||||
else
|
||||
{
|
||||
em.setCacheManager(cacheManager);
|
||||
return em;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user