传智播客java学习 教育办公系统4
今天继续教育办公系统的旅程,今天主要讲的是权限模块:
1. 集成 spring-security 框架
1). 加入 spring-security 的两个 jar 包
2). 在 web.xml 文件中加入加入 spring-security 框架的过滤器
3). 新建 applicationContext-security.xml 配置文件,并且把 security 作为默认的命名空间,
并将其导入到 applicationContext.xml 中
4). 设计领域模型:
Authority -- 权限
Resource -- 资源
Role -- 角色
Employee -- 添加 Set<Role> roleSet
属性
Resource 和 Authority 为多对多的对应关系
Authority 和 Role 为多对多的对应关系
Role 和 Employee 为多对多的对应关系
所以还需要 3 个额外的关联表
** 数据表设计参见 spring-security-2
5).
①. 修改当前系统的 login.jsp 页面, 改为 spring-security 的登录页面, 并且在
<http> 节点中进行配置.
** 注意:
spring-security 在登录成功后, 利用 "重定向" 转到 form-login 节点对应的
default-target-url 属性对应的页面. 所以不能直接将其配置为
相关文档:
CEFinder是CKEditor的文件浏览器。目前还没有给出java版本。对于那些幻想仅通过改几个url就可以使用FCKEditor的java版的朋友,我只能说,清醒一下吧……=。=
原因如下:
FCKEditor的java版通过command参数确定请求指令:
get提交方式可能出现的命令:
&n ......
请看下面一例:
public class TestAbstract {
int count;
public void operation(){
System.out.println("count = " + (++count));
}
}
public class Test extends TestAbstract {
public static void main(String[] args) {
Test test = new Test();
TestAbstract testAb = new TestAbstract();
testAb.operati ......
public class DeadLock {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
final Object resource1 = "resource1";
final Object resource2 = "resource2";
Thread t1 = new Thread(){
public void run(){
syn ......
Long long ago in a galaxy far,far away......
HakunaMatata
主页博客相册|个人档案 |好友
查看文章
为什么要设置JAVA_HOME&Path&CLASSPATH&CATALINA_HOME
2008-01-19 14:26
首先得介绍下面几个参数的作用:
current directory(当前目录):
当前在用的目录 ......