NutzCN Logo
问答 集成Ehcache及DaoCache启动错误,急求!!
发布于 2734天前 作者 qq_b7c44cd1 2126 次浏览 复制 上一个帖子 下一个帖子
标签:

ehcache.js:
var ioc = {
cacheManager : {
type : "net.sf.ehcache.CacheManager",
factory : "net.sf.ehcache.CacheManager#getCacheManager",
args : ["nutzbook"] // 对应shiro.ini中指定的ehcache.xml中定义的name
}
/*
// 如果不需要shiro初始化的Ehcache, 使用下面的方式配置
cacheManager : {
type : "net.sf.ehcache.CacheManager",
factory : "net.sf.ehcache.CacheManager#create"
}
*/
};

nutzbook-mvc-chain.js:
var chain={
"default" : {
"ps" : [
"net.wendal.nutzbook.mvc.LogTimeProcessor",
"org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor",
"org.nutz.mvc.impl.processor.EncodingProcessor",
"org.nutz.mvc.impl.processor.ModuleProcessor",
"org.nutz.integration.shiro.NutShiroProcessor",
"org.nutz.mvc.impl.processor.ActionFiltersProcessor",
"org.nutz.mvc.impl.processor.AdaptorProcessor",
"org.nutz.mvc.impl.processor.MethodInvokeProcessor",
"org.nutz.mvc.impl.processor.ViewProcessor"
],
"error" : 'org.nutz.mvc.impl.processor.FailProcessor'
}
};

ehcache.xml:(ehcache.xsd 这个文件没有)
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
monitoring="autodetect" dynamicConfig="true" name="nutzbook">

<cache name="shiro-activeSessionCache"
   maxElementsInMemory="10000"
   overflowToDisk="false"
   eternal="true"
   timeToLiveSeconds="0"
   timeToIdleSeconds="0"
   diskPersistent="false"
   diskExpiryThreadIntervalSeconds="600"/>

<defaultCache maxElementsInMemory="10000" eternal="false"
    timeToIdleSeconds="86400" timeToLiveSeconds="86400" overflowToDisk="false"
    diskPersistent="false" diskExpiryThreadIntervalSeconds="120"
    statistics="false" />

<cache name="markdown" maxEntriesLocalHeap="1000"
    maxEntriesLocalDisk="1000000" overflowToDisk="true" diskPersistent="true"
    diskSpoolBufferSizeMB="20" timeToIdleSeconds="0" timeToLiveSeconds="0"
    memoryStoreEvictionPolicy="LFU"
    eternal="true">
</cache>


shiro.ini:
[main]
nutzdao_realm = net.wendal.nutzbook.shiro.realm.SimpleAuthorizingRealm

cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager
cacheManager.cacheManagerConfigFile=classpath:ehcache.xml
nutzdao_realm.cacheManager = $cacheManager

authc = org.nutz.integration.shiro.SimpleAuthenticationFilter
authc.loginUrl = /user/login
logout.redirectUrl= /user/login
securityManager.cacheManager = $cacheManager
[urls]
/rs/* = anon
/user/logout = logout
/user/error = anon
/user/login = anon
/user/profile/active/mail = anon

BaseModule.java:
package net.wendal.nutzbook.module;

import net.wendal.nutzbook.service.EmailService;
import org.apache.shiro.cache.CacheManager;
import org.nutz.dao.Condition;
import org.nutz.dao.Dao;
import org.nutz.dao.QueryResult;
import org.nutz.dao.pager.Pager;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.lang.random.R;
import org.nutz.lang.util.NutMap;
import org.nutz.log.Log;
import org.nutz.log.Logs;

import java.util.List;

/**
* @author mrj
* @date 2017/5/9
*/
public abstract class BaseModule {
private static final Log log = Logs.get();

@Inject protected EmailService emailService;

protected byte[] emailKEY = R.sg(24).next().getBytes();
/**
 * 注入同名的一个ioc对象
 */
@Inject
protected Dao dao;

@Inject
protected CacheManager cacheManager;

public BaseModule() {
}


protected QueryResult query(Class<?> klass, Condition cnd, Pager pager, String regex) {
       if (pager != null && pager.getPageNumber() < 1) {
           pager.setPageNumber(1);
       }
       List<?> roles = dao.query(klass, cnd, pager);
       dao.fetchLinks(roles, null);
       pager.setRecordCount(dao.count(klass, cnd));
       return new QueryResult(roles, pager);
   }

   protected NutMap ajaxOk(Object data) {
       return new NutMap().setv("ok", true).setv("data", data);
   }

   protected NutMap ajaxFail(String msg) {
       return new NutMap().setv("ok", false).setv("msg", msg);
   }

}

MainSetup.java:
package net.wendal.nutzbook;

import net.wendal.nutzbook.bean.User;
import net.wendal.nutzbook.service.AuthorityService;
import net.wendal.nutzbook.service.UserService;
import org.apache.shiro.cache.CacheManager;
import org.nutz.dao.Dao;
import org.nutz.dao.util.Daos;
import org.nutz.integration.quartz.NutQuartzCronJobFactory;
import org.nutz.ioc.Ioc;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;

import static org.nutz.dao.util.Pojos.log;

/**
* mrj
*/
public class MainSetup implements Setup {

// 注意是init方法,不是destroy方法
public void init(NutConfig nc) {


    Ioc ioc = nc.getIoc();


    Dao dao = ioc.get(Dao.class);
    //Daos.migration(dao, User.class, true, false, false);
    // 如果提示没有createTablesInPackage方法,请确认用了最新版的nutz,且老版本的nutz已经删除干净
    Daos.createTablesInPackage(dao, "net.wendal.nutzbook", false);

    // 初始化默认根用户
    if (dao.count(User.class) == 0) {
        UserService us = ioc.get(UserService.class);
        us.add("admin", "123456");


    }
  /*  if (dao.count(User.class) == 0) {
        User user = new User();
        user.setName("admin");
        user.setPassword("123456");
        user.setCreateTime(new Date());
        user.setUpdateTime(new Date());
        dao.insert(user);
    }*/


    // 获取NutQuartzCronJobFactory从而触发计划任务的初始化与启动
    // ioc.get(NutQuartzCronJobFactory.class);
    System.out.print("-----hhhh--------");
    // 测试发送邮件
     /*     try {
              HtmlEmail email = ioc.get(HtmlEmail.class);
              email.setSubject("测试NutzBook");
              email.setMsg("This is a test mail ... :-)" + System.currentTimeMillis());
              email.addTo("3125189441@qq.com");//请务必改成您自己的邮箱啊!!!
              email.buildMimeMessage();
              email.sendMimeMessage();
          } catch (Exception e) {
              e.printStackTrace();
          }*/
    // 获取NutQuartzCronJobFactory从而触发计划任务的初始化与启动
    //ioc.get(Scheduler.class);
    ioc.get(NutQuartzCronJobFactory.class);

    AuthorityService as = ioc.get(AuthorityService.class);
    as.initFormPackage("net.wendal.nutzbook");
    as.checkBasicRoles(dao.fetch(User.class, "admin"));

    CacheManager cacheManager = ioc.get(CacheManager.class);
    log.debug("Ehcache CacheManager = " + cacheManager);
}

public void destroy(NutConfig nc) {
    // webapp销毁之前执行的逻辑
    // 这个时候依然可以从nc取出ioc, 然后取出需要的ioc 对象进行操作
}

}

9 回复

继续补充:
lib下的jar:
commons-beanutils-1.9.3.jar
commons-email-1.3.3.jar
commons-logging-1.2.jar
druid-1.0.26.jar
ehcache.jar
javax.mail-1.5.2.jar
javax.servlet.jsp.jstl-1.2.0.jar
log4j-1.2.17.jar
mysql-connector-java-5.1.40.jar
nutz-1.r.60.jar
nutz-integration-quartz-1.r.60.r2.jar
nutz-integration-shiro-1.r.60.r2.jar
nutz-plugins-daocache.jar
quartz-2.2.3.jar
quartz-jobs-2.2.3.jar
shiro-all-1.3.2.jar
shiro-ehcache-1.3.2.jar
simplecaptcha-1.2.2.jar
slf4j-api-1.7.25.jar
slf4j-log4j12-1.7.25.jar
taglibs-standard-impl-1.2.5.jar
taglibs-standard-jstlel-1.2.5.jar
taglibs-standard-spec-1.2.5.jar

日志错误:
/usr/local/tomcat7/bin/catalina.sh run
Connected to the target VM, address: '127.0.0.1:51514', transport: 'socket'
[2017-05-21 08:06:18,539] Artifact nutz:war exploded: Server is not connected. Deploy is not available.
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Server version: Apache Tomcat/7.0.76
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Server built: Mar 9 2017 13:49:01 UTC
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Server number: 7.0.76.0
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: OS Name: Mac OS X
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: OS Version: 10.12.2
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Architecture: x86_64
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: JVM Version: 1.8.0_121-b13
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: JVM Vendor: Oracle Corporation
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: CATALINA_BASE: /Users/morongjun/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: CATALINA_HOME: /usr/local/tomcat7
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Djava.util.logging.config.file=/Users/morongjun/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz/conf/logging.properties
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51514,suspend=y,server=n
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Dcom.sun.management.jmxremote=
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Dcom.sun.management.jmxremote.port=1099
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat7/endorsed
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Dcatalina.base=/Users/morongjun/Library/Caches/IntelliJIdea2017.1/tomcat/Unnamed_nutz
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Dcatalina.home=/usr/local/tomcat7
?? 21, 2017 8:06:25 ?? org.apache.catalina.startup.VersionLoggerListener log
??: Command line argument: -Djava.io.tmpdir=/usr/local/tomcat7/temp
?? 21, 2017 8:06:25 ?? org.apache.catalina.core.AprLifecycleListener lifecycleEvent
??: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/morongjun/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
?? 21, 2017 8:06:26 ?? org.apache.coyote.AbstractProtocol init
??: Initializing ProtocolHandler ["http-bio-8080"]
?? 21, 2017 8:06:26 ?? org.apache.coyote.AbstractProtocol init
??: Initializing ProtocolHandler ["ajp-bio-8009"]
?? 21, 2017 8:06:26 ?? org.apache.catalina.startup.Catalina load
??: Initialization processed in 1453 ms
?? 21, 2017 8:06:26 ?? org.apache.catalina.core.StandardService startInternal
??: Starting service Catalina
?? 21, 2017 8:06:26 ?? org.apache.catalina.core.StandardEngine startInternal
??: Starting Servlet Engine: Apache Tomcat/7.0.76
?? 21, 2017 8:06:26 ?? org.apache.coyote.AbstractProtocol start
??: Starting ProtocolHandler ["http-bio-8080"]
?? 21, 2017 8:06:26 ?? org.apache.coyote.AbstractProtocol start
??: Starting ProtocolHandler ["ajp-bio-8009"]
?? 21, 2017 8:06:26 ?? org.apache.catalina.startup.Catalina start
??: Server startup in 142 ms
Connected to server
[2017-05-21 08:06:26,841] Artifact nutz:war exploded: Artifact is being deployed, please wait...
2017-05-21 20:06:29,823 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:128) INFO - Starting Shiro environment initialization.
2017-05-21 20:06:29,847 org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:76) DEBUG - Checking any specified config locations.
2017-05-21 20:06:29,847 org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:81) DEBUG - No INI instance or config locations specified. Trying default config locations.
2017-05-21 20:06:29,856 org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:159) DEBUG - Opening resource from class path [shiro.ini]
2017-05-21 20:06:29,870 org.apache.shiro.config.Ini.load(Ini.java:351) DEBUG - Parsing [main]
2017-05-21 20:06:29,874 org.apache.shiro.config.Ini.load(Ini.java:351) DEBUG - Parsing [urls]
2017-05-21 20:06:29,875 org.apache.shiro.web.env.IniWebEnvironment.getDefaultIni(IniWebEnvironment.java:136) DEBUG - Discovered non-empty INI configuration at location 'classpath:shiro.ini'. Using for configuration.
2017-05-21 20:06:29,881 org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:122) DEBUG - Creating instance from Ini [sections=main,urls]
2017-05-21 20:06:30,267 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:150) ERROR - Shiro environment initialization failed
java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:181)
at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:168)
at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:302)
at org.apache.shiro.config.ReflectionBuilder$InstantiationStatement.doExecute(ReflectionBuilder.java:927)
at org.apache.shiro.config.ReflectionBuilder$Statement.execute(ReflectionBuilder.java:887)
at org.apache.shiro.config.ReflectionBuilder$BeanConfigurationProcessor.execute(ReflectionBuilder.java:765)
at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:260)
at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:167)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:130)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:108)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:94)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
at org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
at org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1863)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
?? 21, 2017 8:06:30 ?? org.apache.catalina.core.StandardContext startInternal
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
??: One or more listeners failed to start. Full details will be found in the appropriate container log file
Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.CacheException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
... 71 more
?? 21, 2017 8:06:30 ?? org.apache.catalina.core.StandardContext startInternal
??: Context [] startup failed due to previous errors
[2017-05-21 08:06:30,334] Artifact nutz:war exploded: Error during artifact deployment. See server log for details.
?? 21, 2017 8:06:36 ?? org.apache.catalina.startup.HostConfig deployDirectory
??: Deploying web application directory /usr/local/tomcat7/webapps/manager
?? 21, 2017 8:06:36 ?? org.apache.catalina.startup.HostConfig deployDirectory
??: Deployment of web application directory /usr/local/tomcat7/webapps/manager has finished in 161 ms

然后呢?报啥错误

有"插入代码/日志"的按钮!!!!

java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException

jar都没加

@wendal 这个类不是在shiro-all-1.3.2.jar这个里面的吗?还是需要自己去下载?🙏

ehcache是单独的jar,起码2.8以上

@wendal 我引入的是这个ehcache-3.3.1.jar。但是导入包的时候没有net.sf.ehcach 这个包提示

3.x系列是不行的,用2.x系列

@wendal 好的,我去下载试试,谢谢!

@wendal 可以了,谢谢!🙏

添加回复
请先登陆
回到顶部