I was back in the classroom this week teaching Spring Framework after several weeks of consulting work. I had the perfect group of students for getting back into the teaching mode. All my students this week were eager learners with terrific skills. As they studied the Spring Framework, they had some great questions and were quick to experiment with the vast array of options that exist in Spring. In one particular lab, we were creating a CustomEditorConfigurer (see here for… Read More
Spring
Java User Group – Beyond Basic Spring – Live Recording – 1/14/13
For upcoming Java User Groups go to: http://www.intertech.com/Free-Developer-Training/JavaUserGroup… Read More
Singleton Beans (Lazy and not so lazy)
The scope of a Spring bean determines when the bean comes into existence and how long it hangs around in the Spring container. The scope of a Spring bean can be set to the options shown in the table below. Scope Attribute Effect Singleton A single instance is created for the container (the default scope). Prototype A new instance is created each time it is requested from the container. Request A bean instance is created and tied to an HTTP… Read More
Spring’s @Required Annotation
A few weeks ago, a student in my Spring Framework class made an inquiry about the @Required annotation in Spring. Mark asked “was it possible to dependency inject <null/> and still satisfy the @Required annotation?” In fact, it is! The @Required annotation is one that I find many people are not entirely aware of its meaning or consequences as its name is a little misleading. What @Required Implies The @Required annotation can be placed on a setter for any dependency… Read More
Spring MVC Handler Methods
Since Spring 2.5, the controllers of an MVC (model-view-controller) Web application are annotated with @Controller and @RequestMapping. The @Controller annotation designates the component as one serving in the stereotype controller role. However, @RequestMapping is just as important an annotation in controllers as it dictates what traffic gets sent to various “handler methods” in the controller. @RequestMapping Controllers can have multiple handler methods. Each handler method, with its own @RequestMapping, cause certain request URLs be mapped to the method. @Controller public… Read More
Spring Transactions and the Element
This week, I had a wonderful group of people from the IT department of one of Minnesota’s great counties in my classroom to learn Spring 3. It’s always nice to see a group of people that seem to get along well in the classroom. My guess is they also get along well at work and that usually bodes well for software projects. Teams that work together usually find solutions together. A couple of very good questions from class this week… Read More
Clarifying Spring Framework IDs and Names
All Spring beans must have an identifier. It says so right in the Spring documentation: “Every bean has one or more identifiers. These identifiers must be unique within the container that hosts the bean.” Identifier Confusion Unfortunately, the fact that a Spring bean can have an “id” and a “name” makes things confusing. Making matters worse, creating two beans with the same identifier (id or name) doesn’t necessarily lead to an exception. Huh? Say what? An example is in order… Read More
Secrets of the Spring AOP Proxy
By Jim White (Director of Training and instructor) Spring Aspect Oriented Programming (AOP) is a powerful mechanism to weave cross cutting concerns like security, transactions, exception handling, logging, etc. into business code ("core concerns") without explicitly adding calls to the cross cutting concern. This allows the cross cutting concern to be updated, removed, swapped out, and generally maintained in a much simpler fashion. AOP Under the Covers – the Proxy Having said that, because of the way AOP is implemented,… Read More
Spring Framework, JSR-303 Validation and Custom Messages
By Jim White (Director of Training and Instructor) In Minnesota where Intertech is located, spring comes a little later that in other parts of the country. This year, I noticed our flowering trees finally came out in full force this week. ?Bout time! It seemed very fitting that I spent the week teaching Spring 3 to a great group of people. On the last day of class, I got a question from Michelle that I wasn?t able to answer as… Read More
Small but Powerful – Spring 3 Type Conversion System
By Jim White (Director of Training and Instructor) Its fall already! Where did the summer go? Its been almost a year since Spring 3.0 was released. Have you and your organization migrated to this new platform yet? I suspect if you have not, you will be doing so shortly. Spring 3 is loaded with new features – some big and some small. Some features, like Spring Expression Language, are bigger and take some time to learn and use. Others are… Read More


