Spring 4 offers an array of new features. As with all releases, some of the new features are big and impactful. Others are tiny but helpful. Autowiring Collections One of the new small features in Spring 4 is the ability to use @Order with autowiring. There has always been the ability to have Spring automatically collect all beans of a given type and inject them into a collection or array. Since Spring 2.5, this was most commonly accomplished by annotation as… Read More
Spring Framework – Version 4 Due Out Tomorrow!
Happy holidays to everyone. I hope you are enjoying this festive time of year and you get a little down time during the holidays. If you are like me, you might enjoy using some of your down time to update yourself on the Java/open source APIs that have appeared this year. There have been quite a few advances this year. In particular, you may want to spin up on Spring 4. Spring Framework 4 GA (general availability) is due out tomorrow – Dec… Read More
New Training for Hibernate and JPA
Intertech has a new class for Java developers! It is called Complete Hibernate and JPA. You can find out more details here. This class teaches Hibernate 4.2 and JPA 2. Even though Hibernate 5 is not yet out, it also discusses a few anticipated features of Hibernate 5. Covering native and spec-driven APIs Some project teams continue to use Hibernate and its native API and non-specification defined features for their application’s persistence layer. Meanwhile, project teams that are attempting to… Read More
Get Raspberry Pi Trained (and get a free Pi!)
I am excited to announce that Intertech is offering Raspberry Pi training. Even more exciting is that if you sign up for this class, not only will you learn about the Pi and how to develop applications on this nifty little platform, you will also get a Raspberry Pi starter kit (details below) as part of the class! Our class is called Complete Raspberry Pi. About the Pi The Raspberry Pi is a credit card sized single board computer originally designed… Read More
Understanding Spring MVC Model and Session Attributes
As a Java Web application developer, you quickly learn about the request (HttpServletRequest) and session (HttpSession) scopes. Understanding these scopes and how to work data and objects in and out of these scopes is critical to designing and building Web applications in Java. [For a quick tutorial on request and session scopes, here is a post in StackOverflow that can help.] Spring MVC Scopes When I started writing Web applications in Spring MVC, I found the Spring model and session attributes to… Read More
When I teach Spring, I tell my students that Spring’s MVC architecture is one that allows the human facing Web site to easily be adapted to address non-human users. That is, the Spring MVC architecture easily supports RESTful Web services. In fact, Spring MVC applications can address human and machine users alike without the need for separate controller components or alternative request mapping paths. By adding the ContentNegotiatingViewResolver, along with a few extra XML, JSON or alternative formatting beans, your other Web application… Read More
Spring Expression Language – a Spring 3 Feature You May Be Forgetting?
Spring Expression Language (SpEL) was one of the new features that debuted with Spring 3.0. Spring 3.0 was released back in December 2009. So that makes this feature a little less than four years old as of this writing. Yet, in my informal survey of teams using Spring, I am always a bit surprised at how few applications are taking advantage of this powerful feature today. So in this post, I’d like to provide a quick tutorial on SpEL and… Read More
What’s package-info.java for?
In some recent classes, my students have encountered a package-info.java file tucked inside of some of the sample code we get from courseware providers. “What’s that thing?”, they usually ask. package-info.java’s purpose The package-info.java is a Java file that can be added to any Java source package. Its purpose is to provide a home for package level documentation and package level annotations. Simply create the package-info.java file and add the package declaration that it relates to in the file. In fact,… Read More
Running Local Java Applets on a Mac
With recent security issues involving the JRE, Apple has added a few layers of protection to prevent local Java Applets from running in a browser. In many cases you won’t see any warnings, errors, or further instructions; the applet will simply not appear in the web page. Of course, we’re seeing fewer and fewer new applets being made these days, but for those that are still supporting them, and want to do local testing on a Mac (OS X… Read More
Java EE 7 is Around the Corner!
Java EE is not one single specification, but rather a collection of many enterprise oriented specifications. In fact, the next version of Java EE (7) is comprised of 14 Java Specification Requests (JSRs), and 9 Maintenance Releases (MRs). On April 29th, the last of the remaining specifications were approved by the Java Community Process’s Executive Committee… this means Java EE 7 is on its way! No release dates have been set yet, however the Oracle blog states that a new implementation… Read More