NutzCN Logo
问答 谁清楚nutz 怎么集成ehcache啊? 最好是详细点!
发布于 2760天前 作者 qq_334dccb3 1416 次浏览 复制 上一个帖子 下一个帖子
标签:

谁清楚nutz 怎么集成ehcache啊? 最好是详细点! 本人新手,第一次使用nutz ,谢谢啦!

11 回复

@wendal 我就是照这上面弄的 但是报错啊

既然报错,那就贴报错信息嘛

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /E:/ecworkspace/new-black-manage/src/main/java/com/eversec/controller/AccountsController.java:[47,22] 程序包net.sf.ehcache不存在
[ERROR] /E:/ecworkspace/new-black-manage/src/main/java/com/eversec/controller/AccountsController.java:[74,17] 找不到符号
符号: 类 CacheManager
位置: 类 com.eversec.controller.AccountsController
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.188 s
[INFO] Finished at: 2017-05-04T11:07:26+08:00
[INFO] Final Memory: 21M/211M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project new-black-manage: Compilation failure: Compilation failure:
[ERROR] /E:/ecworkspace/new-black-manage/src/main/java/com/eversec/controller/AccountsController.java:[47,22] 程序包net.sf.ehcache不存在
[ERROR] /E:/ecworkspace/new-black-manage/src/main/java/com/eversec/controller/AccountsController.java:[74,17] 找不到符号
[ERROR] 符号: 类 CacheManager
[ERROR] 位置: 类 com.eversec.controller.AccountsController
[ERROR] -> [Help 1] [ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

没加ehcache依赖

是在pom.xml里面加吗??

@qq_334dccb3 是

麻烦问下 ehcacha 怎么使用啊?我就是想缓存查询数据 能给我例子吗?谢谢

@qq_334dccb3 去看ehcache的api没,基本上就是取Cache实例,然后当个map来用

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