1、testInitSystemData.java 单元测试类会出错呢?
网上说是新版本的Hibernate跟javaee.jar里面的JPA接口冲突了。
解决方法:移除MyEclipse自带的Java EE 5 Libraries,自己新建一个user libraries,
加入Java EE中的jsf-api.jar、jsf-impl.jar和jstl-1.2.jar,再加入Tomcat中自带的servlet-api.jar
2、自定义ShiroDbRealm,实现认证和授权
3、利用反射对Dao层的抽象 IBaseDao、DefultBaseDao,可以方便的进行查询
// 1、使用hpql进行查询
// user = (User) baseService.getUniqueResultByJpql("from User as o where o.account=?", account);
// 2、借助QueryCondition 进行查询
QueryCondition queryCondition = new QueryCondition("account", QueryCondition.EQ, account);
// 3、借助QueryCondition,使用自定义hpql进行查询
// String hpql = "o.account='" + account + "'";
// QueryCondition queryCondition = new QueryCondition(hpql);
List<QueryCondition> queryConditions = new ArrayList<QueryCondition>();
queryConditions.add(queryCondition);
user = (User) baseService.getSingleResult(User.class, queryConditions);
4、shiro没有用缓存
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SpringMVC+Apache Shiro+JPA(hibernate)整合 (199个子文件)
DefultBaseDao.class 10KB
DefultBaseService.class 6KB
ValidateCode.class 4KB
Pagination.class 4KB
LoginController.class 3KB
testInitSystemData.class 3KB
ShiroDbRealm.class 3KB
Permission.class 3KB
IBaseService.class 3KB
IBaseDao.class 3KB
Role.class 3KB
LoginController.class 3KB
User.class 3KB
MonitorRealm.class 2KB
UserServiceImpl.class 2KB
QueryCondition.class 2KB
CustomDateSerializer.class 1KB
UserController.class 1KB
UserController.class 1KB
User.class 725B
EncryptUtils.class 649B
IUserService.class 298B
.classpath 6KB
.classpath 3KB
org.eclipse.wst.common.component 587B
org.eclipse.wst.common.component 483B
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.jsdt.ui.superType.container 49B
Thumbs.db 19KB
top_bg.gif 519B
blank.gif 43B
hibernate-core-4.1.8.Final.jar 4.29MB
guava-12.0.1.jar 1.71MB
aspectjweaver.jar 1.47MB
ehcache-core-2.6.2.jar 1.28MB
ant.jar 1.26MB
IKAnalyzer2012_u6.jar 1.11MB
javaee.jar 1.01MB
jackson-all-1.8.5.jar 989KB
freemarker-2.3.15.jar 859KB
jsf-impl.jar 813KB
org.springframework.context-3.1.1.RELEASE.jar 812KB
org.springframework.context-3.1.1.RELEASE.jar 812KB
jackson-mapper-asl-1.9.2.jar 748KB
mysql-connector-java-5.1.6-bin.jar 687KB
javassist-3.15.0-GA.jar 633KB
org.springframework.beans-3.1.1.RELEASE.jar 576KB
org.springframework.beans-3.1.1.RELEASE.jar 576KB
commons-collections-3.2.1.jar 562KB
org.springframework.web.servlet-3.1.1.RELEASE.jar 560KB
org.springframework.web.servlet-3.1.1.RELEASE.jar 560KB
commons-collections.jar 558KB
org.springframework.web-3.1.1.RELEASE.jar 532KB
org.springframework.web-3.1.1.RELEASE.jar 532KB
shiro-all-1.2.1.jar 521KB
shiro-all-1.2.0.jar 521KB
log4j-1.2.16.jar 470KB
log4j-1.2.16.jar 470KB
hibernate-entitymanager-4.1.8.Final.jar 467KB
sqljdbc4.jar 455KB
org.springframework.core-3.1.1.RELEASE.jar 439KB
org.springframework.core-3.1.1.RELEASE.jar 439KB
antlr-2.7.7.jar 435KB
antlr-2.7.7.jar 435KB
org.springframework.jdbc-3.1.1.RELEASE.jar 395KB
org.springframework.orm-3.1.1.RELEASE.jar 370KB
org.springframework.aop-3.1.1.RELEASE.jar 324KB
org.springframework.aop-3.1.1.RELEASE.jar 324KB
cglib-nodep-2.1_3.jar 317KB
jsf-api.jar 314KB
dom4j-1.6.1.jar 307KB
dom4j-1.6.1.jar 307KB
jtds-1.2.5.jar 295KB
standard.jar 287KB
jtds-1.2.jar 279KB
commons-lang-2.5.jar 273KB
avro-1.5.1.jar 254KB
org.springframework.transaction-3.1.1.RELEASE.jar 241KB
junit-4.8.1.jar 231KB
org.springframework.test-3.1.1.RELEASE.jar 224KB
jackson-core-asl-1.9.2.jar 223KB
org.springframework.jms-3.1.1.RELEASE.jar 195KB
org.springframework.web.portlet-3.1.1.RELEASE.jar 186KB
commons-beanutils.jar 184KB
servlet-api.jar 173KB
org.springframework.expression-3.1.1.RELEASE.jar 172KB
org.springframework.expression-3.1.1.RELEASE.jar 172KB
commons-io-2.0.1.jar 156KB
json-lib-2.3-jdk15.jar 148KB
json-lib-2.1.jar 122KB
commons-dbcp-1.2.2.jar 119KB
bonecp-0.7.1.RELEASE.jar 113KB
org.springframework.context.support-3.1.1.RELEASE.jar 105KB
org.springframework.context.support-3.1.1.RELEASE.jar 105KB
hibernate-jpa-2.0-api-1.0.1.Final.jar 100KB
ezmorph-1.0.4.jar 84KB
commons-io.jar 82KB
hibernate-commons-annotations-4.0.1.Final.jar 79KB
org.springframework.oxm-3.1.1.RELEASE.jar 71KB
jakarta-oro.jar 64KB
共 199 条
- 1
- 2
时光在路上
- 粉丝: 320
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页