08 2014 档案

Spring HandlerInterceptor
摘要:1.SpringHandlerInterceptor 可以组成一个chain。这个接口有三个方法:public interface HandlerInterceptor { /** * Intercept the execution of a handler. Called after... 阅读全文

posted @ 2014-08-26 14:29 Ranger0526 阅读(583) 评论(0) 推荐(0) 编辑

Spring data jpa
摘要:1. Spring data jpa怎么去判断一个对象的是否为新对象呢?spring data 提供了三种策略:able2.2.Options for detection whether an entity is new in Spring Data JPAId-Property inspectio... 阅读全文

posted @ 2014-08-24 08:27 Ranger0526 阅读(572) 评论(0) 推荐(0) 编辑

Spring Security @PreAuthorize 拦截无效
摘要:1. 在使用spring security的时候使用注解,@PreAuthorize("hasAnyRole('ROLE_Admin')")放在对方法的访问权限进行控制失效,其中配置如:@Configuration@EnableWebSecuritypublic class SecurityConf... 阅读全文

posted @ 2014-08-15 10:31 Ranger0526 阅读(17420) 评论(0) 推荐(0) 编辑

Java ee el表达式
摘要:以前在开发的时候,偶尔会遇到jsp页面不支持el表达式的情况。这个的原因是因为El功能被关闭了,当时的解决办法是关闭忽略。isELIgnored 设设置但是为什么有时候不用设置也可以了呢。发现原来是和web.xml的声明有关系。有些版本的servlet声明默认就是关闭的。貌似在2.4以前的都需要加上 阅读全文

posted @ 2014-08-14 06:24 Ranger0526 阅读(306) 评论(0) 推荐(0) 编辑

Spring ContentNegotiatingViewResolver
摘要:1. Spring 返回视图采用了ViewResolver,如果一般是jsp的话,可以采用InternalResourceViewResolver。2.还可以通过ContentNegotiatingViewResolver来返回不同种类的视图,具体是是根据MediaTypes。3. 一共有三种方式:... 阅读全文

posted @ 2014-08-07 10:14 Ranger0526 阅读(844) 评论(0) 推荐(0) 编辑

Spring3 MVC 类型转换
摘要:1. Spring在进行类型转化都是基于java.beans.PropertyEditor接口。2. 可以使用@InitBinder来进行对单个controller的类型进行操作,比如添加Date类型的转换器:@InitBinder public void initBinder(WebData... 阅读全文

posted @ 2014-08-03 16:12 Ranger0526 阅读(176) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示