??xml version="1.0" encoding="utf-8" standalone="yes"?>91久久高清国语自产拍,国产aⅴ精品一区二区三区黄,岛国精品视频在线播放 http://www.aygfsteel.com/Supershen/Java JavaEE Jsp Struts1.x Struts2.x Hibernate Spring2.0 EJB3.0 ASP .NET Php Flex zh-cn Mon, 16 Jun 2025 21:52:36 GMT Mon, 16 Jun 2025 21:52:36 GMT 60 springside mini-web学习ȝ?/title> http://www.aygfsteel.com/Supershen/archive/2009/01/08/250512.htmlSuper·shen BLOG Super·shen BLOG Thu, 08 Jan 2009 09:01:00 GMT http://www.aygfsteel.com/Supershen/archive/2009/01/08/250512.html http://www.aygfsteel.com/Supershen/comments/250512.html http://www.aygfsteel.com/Supershen/archive/2009/01/08/250512.html#Feedback 2 http://www.aygfsteel.com/Supershen/comments/commentRss/250512.html http://www.aygfsteel.com/Supershen/services/trackbacks/250512.html
1.struts2
使用ZeroConfig + CodeBehind插g,实现U定大于配置的零配置文g风格.
Ҏ不用配置struts.xml文g
q里是action实现annotation CodeBehind?br />
如方?br />
通过 /user/user!input.action讉KQ?q{?/user/user-xxx.jsp面
即namespace + action name + "-" + "xxx.jsp"
另外其中 action中需要注入的 service 使用annotation Q在setҎ?加入@request ?@ autowired ?@resource
注释Q具体是用那个暂时无法搞清楚QM我用request ׃行,另外两个都可以)
有了q个代码之后 p注入spring 环境中的 id = userManager 的bean Q我个h理解Q?br />
而spring?nbsp; id = userManager 的bean 也是通过自动注入完成?br />
主要代码?applicationContext.xml文g中的
代码Q?br />
2.spring
spring2.5.6的annotationҎ用的比较泛滥?新手刚开始看的一头雾水很正常?br />
xml文g中配|自动注册beanQ通过扫描包中的带注解的类。即q个代码Q?br />
扫描C面的c,p动注册成 id=userManager
3.hibernate
使用hiberante3 注解Q不要XML配置Q实体类注解不用多说?br />
需要注意的是entitycȝ扫描配置
看清楚是扫描包,不是扫描c! 所以实体类com.mylu.User是无法扫描到Q要攑֜ com.mylu.xxx.User才能扫描刎ͼ
下边按照ss3风格做的例子Q去掉spring security 框架的, l构更清晰?br />
下蝲Q实例代?/a>
附:
cd
]]> java jsp servlet 获得l对路径的方?/title> http://www.aygfsteel.com/Supershen/archive/2008/09/17/229425.htmlSuper·shen BLOG Super·shen BLOG Wed, 17 Sep 2008 06:55:00 GMT http://www.aygfsteel.com/Supershen/archive/2008/09/17/229425.html http://www.aygfsteel.com/Supershen/comments/229425.html http://www.aygfsteel.com/Supershen/archive/2008/09/17/229425.html#Feedback 0 http://www.aygfsteel.com/Supershen/comments/commentRss/229425.html http://www.aygfsteel.com/Supershen/services/trackbacks/229425.html 在jsp中,其实jsp是servletQjsp和servlet也都是一个classQ?/p>
1 .request.getRealPath()Q这个方法已l不推荐使用Q在servlet后版本中将被取~?/p>
2.getServletContext().getRealPath("/")q个Ҏ比较好用Q可以直接在servlet和jsp中用?/p>
3.request.getSession().getServletContext().getRealPath()也可以在jsp和servlet使用?/p>
4.this.getClass().getClassLoader().getResource("").getPath()Q这个方法可以在LjspQservletQjava文g中用,因ؓ不管是jspQservlet其实都是javaE序Q都是一个class。所以它应该是一个通用的方法?/p>
]]> 单权限系l设计需?/title> http://www.aygfsteel.com/Supershen/archive/2008/08/18/222806.htmlSuper·shen BLOG Super·shen BLOG Mon, 18 Aug 2008 08:17:00 GMT http://www.aygfsteel.com/Supershen/archive/2008/08/18/222806.html http://www.aygfsteel.com/Supershen/comments/222806.html http://www.aygfsteel.com/Supershen/archive/2008/08/18/222806.html#Feedback 0 http://www.aygfsteel.com/Supershen/comments/commentRss/222806.html http://www.aygfsteel.com/Supershen/services/trackbacks/222806.html 普遍的,单的权限pȝ要求Q?br />
1.pȝ所有资源定?[资源表] ( q可以分为更的权限表,操作表,q里通叫资源?
2.定义角色 [角色表]
3.l角色指定资源(一个角色可以管理多个资源) [角色-资源表]
4.定义用户l?[用户表]
5.l用L指定角色Q一个用L可以拥有多种角色Q?[用户l?角色表]
6.l用h定角Ԍ一个用户可以拥有多U角Ԍ可以直接指定角色Q也可以l承用户l的角色Q[用户-角色表]
查找权限Ӟ
Ҏ用户ID[用户-角色表]或用LID[用户l?角色表]Q查到所有角色IDQ再[角色-资源表]扑ֈ所有角色下的所有资源?
此就是用h有的资源。(资源一般ؓ模块Q当然也可以分更l的定义为页面,操作Ҏ{)
此权限设计适合于模块化讉KpȝQ如OA
当然很多pȝ因地而已Q不可能完全满Q按照自ql需求设计是最合适的设计?br />
]]>W一?CGIC sqlite3 代码 http://www.aygfsteel.com/Supershen/archive/2008/03/01/183156.htmlSuper·shen BLOG Super·shen BLOG Sat, 01 Mar 2008 09:11:00 GMT http://www.aygfsteel.com/Supershen/archive/2008/03/01/183156.html http://www.aygfsteel.com/Supershen/comments/183156.html http://www.aygfsteel.com/Supershen/archive/2008/03/01/183156.html#Feedback 1 http://www.aygfsteel.com/Supershen/comments/commentRss/183156.html http://www.aygfsteel.com/Supershen/services/trackbacks/183156.html
插入
用户:
密码:
վ֩ģ壺
ɶ |
|
|
綫 |
°Ͷ |
|
|
|
|
̩ |
|
|
|
Ͻ |
հ |
|
|
|
|
|
캵 |
|
|
ƽ |
|
|
ƽ̶ |
|
|
|
|
|
˿ |
ͨ |
괨 |
|
³ |
Ӫ |
ɽ |
|
|