OPI Blog
Learn from experts in their fields

Browsing Tags: Annotations

Jan 19, 2012
Creating a Spring @StrictDateTimeFormat Annotation
Spring Formatters and Converters make it easy to annotate fields for conversion from Objects to Strings, and are especially useful in web apps. But there is no easy or straightforward way to strictly validate the ...
Introduction to Servlet 3.0
Earlier in 2011 the Apache group released Tomcat v7 on the waiting Servlet world. With this came featured support for Servlet 3.0. In some discussions it seems that Servlet 3.0 was supposedly supported by later versions of Tomcat v6, but I can't find anything more than a few scattered mentions; mostly wishful thinking, it seems. With Tomcat v7, we can now get Servlet 3.0 support! It also supports JSP v2.2 and EL v2.2, but for now I just want to poke at a few niceties provided with Servlet 3.0....
Fine-Grained Security Simplified
Securing an application’s actions by user and role is easy, but what about this fine-grained security?  For many applications it’s important to restrict access to specific domain object instances.  We could use Spring security ACLs ...
Using MyBatis Annotations with Spring 3.0 and Maven
I had a difficult time trying to figure out how to use MyBatis annotations for my project. The examples I found would answer a portion of what I was looking for, but never actually answered what I was looking for. Eventually I found ways to make it work for what I was trying to do. Here are some examples on how to use MyBatis Annotations with Select, SelectProvider, SQLBuilder, and SelectBuilder. ...
Nov 16, 2010
Grails Plumbing: Spring AOP Interceptors With Annotations
In my last post we covered how to use some of the Spring AOP Interceptors in our Grails project for things like simple trace logging and basic performance monitoring. One thing that I mentioned in ...
Aug 6, 2010
How Do Annotations Work?
Recently, I was giving an overview of Java to a bunch of C/C++ developers to help them bridge the gap. Mostly I ended up assuring them that they knew what they were doing and filled ...
Jan 25, 2010
Using JPA and JAXB Annotations in the Same Object
Recently, I started working on some projects where I had to prototype various service end point technologies, including REST and AMF.  During this process, I worked out a fairly nice prototype project template that makes ...