- 浏览: 428580 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (211)
- 思考》感想 (11)
- 数据库操作 譬如Oracle大叔 (7)
- java,咱们有缘吗 (16)
- delphi,你还好吗 (2)
- SSH,哥三儿好 (31)
- 问题!问题?问题!? (9)
- WITH WORK (1)
- 算法与模式 莫事^_^ (10)
- JSP,可以叫你P兄么 (2)
- 啊,咋科斯╮(╯▽╰)╭ (6)
- 巨人肩上的小石子 (2)
- flash她妹flex (38)
- 项目管理 (10)
- 奥特曼,你弟Android来了 (4)
- 麻辣儿gis (0)
- maven 嘛味儿 (3)
- ws 哇塞 webservice (5)
- Oh,no!!!,NoSql (1)
- QQ他哥也是个企鹅,Linux (6)
- 姓i还是姓my 你都叫batis ibatis (3)
- 我喜欢夏天(春天旁边的那个季节)Springside (1)
- 测试! 测就测吧,没有喝(⊙o⊙) (3)
- 是晕+_+ 是浮云 还是云计算 (4)
- ExtJS 你是flex他哥还是他妹 (10)
- svg 你丫的资料真少 (3)
- 叫屁屁还是叫加加 ⊙﹏⊙ c++ (5)
- 鸟,还是只百灵鸟 BIRT (1)
- 权限管理 有权真好 是吧-_-! (1)
- SSH (2)
- 哥三儿好 (2)
- nginx (1)
- Oh (1)
- no!!! (1)
- NoSql (1)
最新评论
-
mong619226543:
谢谢
No identifier specified for entity -
akka_li:
没看懂啥意思!什么原因导致java.net.SocketExc ...
java.net.SocketException: Connection reset 问题解决方法 -
west_jing:
1L正解,<mvc:annotation-dri ...
<mvc:default-servlet-handler/> 导致 Controller失效 -
u010954806:
tgfhfdhdf
Spring Security 国际化文件 messages_zh_CN.properties 中文解释 -
yenshen:
我也碰到这个问题了,找了一大圈,最终问题解决了:<pre ...
<mvc:default-servlet-handler/> 导致 Controller失效
<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <!-- 配置数据库 --> <beans:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <beans:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <beans:property name="url" value="jdbc:oracle:thin:@localhost:1521:zzz" /> <beans:property name="username" value="xxx" /> <beans:property name="password" value="yyy" /> </beans:bean> <http auto-config='true' access-denied-page="/accessDenied.jsp"> <!-- 自定义的登录页面 --> <form-login login-page="/login.jsp"/> <intercept-url pattern="/login.jsp" filters="none"/> <!-- 以下两个<intercept-url 的顺序是不可随便条换的,否则user用户也能登陆/admin.jsp页面 --> <intercept-url pattern="/admin.jsp" access="ROLE_ADMIN"/> <intercept-url pattern="/hello.do*" access="ROLE_USER,ROLE_ADMIN"/> <intercept-url pattern="/index.jsp" access="ROLE_USER,ROLE_ADMIN"/> <intercept-url pattern="/**" access="ROLE_ADMIN" /> <session-management> <concurrency-control max-sessions="1" error-if-maximum-exceeded="true" /> </session-management> </http> <authentication-manager> <authentication-provider > <!-- 配置实现 <user-service> <user name="admin" password="admin" authorities="ROLE_USER,ROLE_ADMIN" /> <user name="user" password="user" authorities="ROLE_USER" /> </user-service> --> <!-- 数据库实现 --> <jdbc-user-service data-source-ref="dataSource" users-by-username-query="select username ,passWord, enabled from users where username=?" authorities-by-username-query="select username,authority from authorities where username=?"/> </authentication-provider> </authentication-manager> <!-- 国际化 --> <beans:bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <beans:property name="basename" value="classpath:messages_zh_CN"/> </beans:bean> <!-- 业务类 --> <beans:bean id="helloWordService" class="com.xx.service.impl.HelloWorldServiceImpl"></beans:bean> <global-method-security> <!-- ROLE_USER能执行sayHello方法 --> <protect-pointcut access="ROLE_USER" expression="execution(* com.xx.service.*.sayHello(..))"/> <!-- ROLE_USER不能执行sayBye方法 --> <protect-pointcut access="ROLE_ADMIN" expression="execution(* com.xx.service.*.sayBye(..))"/> </global-method-security> </beans:beans>
发表评论
-
Spring Security 国际化文件 messages_zh_CN.properties 中文解释
2011-05-04 17:08 7031Spring Security 国际化文件 messages_ ... -
两个Spring Security问题
2011-05-04 17:06 2059两个Spring Security问题 ---------》 ... -
spring security与数据库交互实现简单例子
2011-04-19 16:34 1632spring security与数据库交互实现简单例子 最近 ... -
用struts2 验证用户登录demo
2011-01-28 15:38 2153用struts2 验证用户登录de ... -
Struts2.1.8 执行顺序
2011-01-28 15:18 864public class LoginAction extend ... -
Struts2令人纠结的一个问题
2011-01-27 09:47 969我用Struts2加入自定义的library如下图,就报错, ... -
一份spring配置文件
2011-01-13 14:05 939<?xml version="1.0" ... -
Hibernate关系映射总结
2010-10-18 10:35 1242其实这些东东完全可以参考帮助文档;这里只是总结下。 》》》一对 ... -
No identifier specified for entity:XX.xx
2010-10-12 17:25 1645No identifier specified for ent ... -
Annotation对Hibernate中联合主键定义
2010-10-11 13:28 2201public class User { private in ... -
@MappedSuperclass的用法
2010-10-11 10:21 12588@MappedSuperclass的用法 用在实体的继承过程 ... -
公共dao的结构
2010-09-29 16:17 1336-----------》公共dao的结构 -----共用接口 ... -
No identifier specified for entity
2010-09-29 16:07 11959org.hibernate.AnnotationExcepti ... -
SSJ配置模板
2009-09-14 09:06 859web.xml-----> <?xml versi ... -
一个简单的ssh配置模板
2009-09-12 17:08 1683web.xml------> <?xml vers ... -
Struts----学习笔记 用form提交和sturts提交
2009-09-12 17:02 1193struts是这么配置的 <action path= ... -
Spring学习笔记------Spring和Hibernate的整合配置
2009-09-12 09:15 1390Spring和Hibernate整合配置有两种方式: 方 ... -
Spring学习笔记--------AOP操作
2009-09-10 10:29 1034* AOP操作可与通过注解和xml的方式实现; * 有个问题, ... -
Hibernate学习笔记1--------一个简单的应用
2009-08-30 08:26 993工具类---------> /** *用单例模式 ... -
Hibernate学习笔记2--------------------一对多、多对一简单配置
2009-08-30 08:40 972一的一端------------------------> ...
相关推荐
spring security 使用及配置
spring cloud2.0 eureka server spring security配置,与spring cloud1.X还是有很大区别
spring security配置实例
springsecurity使用配置详解,压缩包里包含主要的代码和详细的word文件说明。
Spring Security 配置实例XML文件
spring-security多登录页面配置,包括前台和后台分开登录界面,注销登录返回不同的界面等。
springsecurity是一个功能强大且高度可定制的身份验证和访问控制框架。springsecurity是一个专注于为Java应用程序提供身份验证和授权的框架。与所有Spring项目一样,Spring安全性的真正威力在于它可以很容易地扩展以...
Spring Security 3.1.3配置实例
Spring Security 演讲PPT(演讲嘉宾:张明星) WebSphere技术专家沙龙在广州圆满举办,WSC超级版主Fastzch(张明星)担任本次沙龙的演讲嘉宾,他给广州的WebSphere技术专家带来了以“Spring Security ”为主题的...
是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架。它提供了一组可以在Spring应用上下文中配置的Bean,充分利用了Spring IoC,DI(控制反转Inversion of Control ,DI:Dependency ...
Spring Security三份资料,实战Spring Security 3.x.pdf;Spring Security 3.pdf;Spring Security使用手册.pdf
spring security 配置(含源码)和教程
spring_security 配置
Spring Security 2 配置精讲
spring security 2 配置说明
我们在使用SpringSecurity作为后台权限框架的时候,框架给我们提供了配置登录请求的接口,供我们配置登录链接,当我们配置了登录链接地址后,前端访问登陆请求的时候显示无权限。 异常分析 由于SpringSecurity的...
spring security spring security 中文文档
Spring Security2 配置 精讲。
spring security 项目配置源码,项目是在eclipse启动的jdk1.8 tomcat1.8能正常运行,有助于学习.zip
如果上面的验证机制不符合你的需求,Spring Security 是一个开放的平台,要实现你 自己的验证机制检查。 为了阅读方便,自己导出的文档,格式为HTML,文件也相对较小。 文档原地址:...