原文地址:http://javabeat.net/spring-data-jpa-query/ In my previous post on Spring Data, I have explained the basic concepts and configurations for Spring Data JPA. In this tutorial, I am going to explain @Queryannotation and how to create custom query us…
使用Annotation 来创建Bean有两种方式 在配置类中创建bean(配置类是指标注为@Configuration的类),在配置类中每一个创建bean的方法都应该标注为@Bean,可以在@Bean 这个annotation中指定Bean name,如果没有指定,则默认使用方法的名字:注意在配置类中一个方法创建的Bean要引用另外一个方法创建的Bean,则直接调用方法即可: 将Java类标注为 @Component,@Repository,@Service,@Controller中的任何一种…
The @Required annotation is used to make sure a particular property has been set. If you are migrate your existing project to Spring framework or have your own @Required-style annotation for whatever reasons, Spring is allow you to define your custom…
你能使用@Aspect annotation将某个Java类标注为Aspect,这个Aspect类里的所有公有方法都可以成为一个Advice,Spring提供了5个Annotation去将某个方法标注为Advice:@Before.@After.@AfterReturning.@AfterThrowing.@Around:为了启用基于annotation的AOP编程,你需要在Application Context文件中插入<aop:aspectj-autoproxy/>标记:@Before.@…
1. 配置 applicationContext 在 Spring 中支持 AOP 的配置非常的简单,只需要在 Spring 配置文件 applicationContext.xml 中添加: <aop:aspectj-autoproxy/> 同时在 applicationContext.xml 的 schema 中配置: 清单 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <beans xmlns="http://www.springfram…
From:http://stackoverflow.com/questions/6632982/how-to-create-custom-methods-for-use-in-spring-security-expression-language-anno None of the mentioned techniques will work anymore. It seems as though Spring has gone through great lengths to prevent u…
One aspect of control flow based type analysis is that the TypeScript compiler narrows the type of a variable within a type guard. This lesson explores how you can define functions and type predicates to create your own type guards similar to the Arr…
Customize UITextView selection color in UITableView Link : http://derekneely.com/2010/01/uitableviewcell-custom-selection-style-color/…
Oracle Forms is having its default records filter, which we can use through Enter Query mode to specify some search criteria or to filter records before display, but you can also create your own filter, which can be more user friendly and easy to use…
spring-data-mongodb之gridfs   mongodb除了能够存储大量的数据外,还内置了一个非常好用的文件系统.基于mongodb集群的优势,GridFS当然也是分布式的,而且备份也方便.当用户把文件上传到GridFS后,文件会被分割成大小为256KB的块,并单独存放起来. 好处如下: 可以有Replication: 可以利用MongoDB的权限访问控制: 可以利用现成的MongoDB备份方式: 今天主要是学习如何使用data这个框架来操作GridFS 首先配置gridFs的模…