`
文章列表

spring-data-jpa

创建查询的顺序 Spring Data JPA 在为接口创建代理对象时,如果发现同时存在多种上述情况可用,它该优先采用哪种策略呢?为此,<jpa:repositories> 提供了 query-lookup-strategy 属性,用以指定查找的顺序。它有如下三个取值: create --- 通过解析方法名字来创建查询。即使有符合的命名查询,或者方法通过 @Query 指定的查询语句,都将会被忽略。 create-if-not-found --- 如果方法通过 @Query 指定了查询语句,则使用该语句实现查询;如果没有,则查找是否定义了符合条件的命名查询,如果找到,则使用 ...
1、在配置文件中增加 一个listen <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>  2、FilterChainProxy 增加 ConcurrentSessionFilter ,这个Filter 要两个属性 sessionRegistry(需要SessionRegistryImpl实例expiredUrl过滤失败时跳转的url) <http> ...

spring security

先来谈一谈Acegi的基础知识,Acegi的架构比较复杂,但是我希望我下面的只言片语能够把它说清楚。大家都知道,如果要对Web资源进行保护,最好的办法莫过于Filter,要想对方法调用进行保护,最好的办法莫过于AOP。Acegi对Web资 ...
Table 2.1. Standard Filter Aliases and Ordering Alias Filter Class Namespace Element or Attribute CHANNEL_FILTER ChannelProcessingFilter http/intercept-url@requires-channel SECURITY_CONTEXT_FILTER
  protected Filter initDelegate(WebApplicationContext wac) throws ServletException {         Filter delegate = wac.getBean(getTargetBeanName(), Filter.class);         if (isTargetFilterLifecycle()) {             delegate.init(getFilterConfig());         }         return delegate; }  使用过spri ...
  AbstractAuthenticationProcessingFilter   1、doFilter->attemptAuthentication UsernamePasswordAuthenticationFilter extends AbstractAuthenticationProcessingFilter   2、attemptAuthentication-> authenticate ProviderManager implements AuthenticationManager   3.authenticate->authenticate ...
@RequestBody 作用:        i) 该注解用于读取Request请求的body部分数据,使用系统默认配置的HttpMessageConverter进行解析,然后把相应的数据绑定到要返回的对象上;       ii) 再把HttpMessageConverter返回的对象数据绑定到 controller中方法的参数上。 使用时机: A) GET、POST方式提时, 根据request header Content-Type的值来判断:     application/x-www-form-urlencoded, 可选(即非必须,因为这种情况的数据@Request ...
 ackson中的@JsonBackReference和@JsonManagedReference,以及@JsonIgnore均是为了解决对象中存在双向引用导致的无限递归(infinite recursion)问题。这些标注均可用在属性或对应的get、set方法中。  @JsonBackReference和@JsonManagedReference:这两个标注通常配对使用,通常用在父子关系中。@JsonBackReference标注的属性在序列化(serialization,即将对象转换为json数据)时,会被忽略(即结果中的json数据不包含该属性的内容)。@JsonManagedRef ...

spring ioc

RequiredAnnotationBeanPostProcessor是一个Spring bean后处理器,检查带有@Required注解的所有bean属性是否设置。   Spring IoC容器管理Bean周期的步骤:   1、构造程序或者工厂方法创建Bean实例。  2、为Bean属性设置值和Bean引用。  3、调用感知接口中定义的设置方法。  

spring mvc

 使用spring-mvc首先需要这些依赖 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springfram ...

Spring Security

er

spring aop

<!-- 启动AspectJ支持 -->       <aop:aspectj-autoproxy />   <!--   为了启用cglib  必须配置proxy-target-class="true" -->   <aop:aspectj-autoproxy proxy-target-class="true"></aop:aspectj-autoproxy>  <dependency>       <groupId

Spring jar包详解

 
今天我先向大家介绍一下Spring的相关jar包。Follow me! spring.jar中包含除了 spring-mock.jar里所包含的内容外其它所有jar包的内容(因为只有在开发环境下才会用到spring-mock.jar来进行辅助测试,正式应用系统中是用不得这些类的。 ...

OpenAjax

todo
todo
Global site tag (gtag.js) - Google Analytics