优化一些细节

This commit is contained in:
RuoYi
2018-07-12 09:58:12 +08:00
parent b8b49209ca
commit df12e06a3d
4 changed files with 264 additions and 63 deletions

View File

@ -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_");

View File

@ -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;
}
}
/**