Note on authors This post is a guest post by Han Lim and Tony Nguyen. Han and Tony have done a great presentation at our Singapore Spring User Group on Spring + Angular JS. This blog is based on their presentation. Abstract In this article, we try to describe our experiences moving from server-side rendering view technologies like JSP, Struts and Velocity to client-side rendering view technologies using AngularJS, a popular Javascript framework for modern browsers. We will talk about some of the things to look out for when you are making this change and potential pitfalls you may encounter. If…
We are glad to announce that we will host a FREE conference about Spring and Hadoop on Friday August 30th in downtown Singapore from 6 to 8 PM. Spring best practices: from Spring Petclinic to Spring Data Hadoop Michael Isvy joined SpringSource (the company behind Spring, now part of Pivotal) in 2008. He has, since then, taught Spring to more than 1000 students in 10 different countries. He has presented on Spring at numerous conferences and is an active technical blogger on the SpringSource blog. Michael holds the position of Education Manager for the Asia-Pacific region at SpringSource…
Spring Petclinic on GitHub
Spring Petclinic on Cloud Foundry
Petclinic + Thymeleaf
Petclinic + Gradle
When it comes to the view layer, Spring @MVC gives you a variety of choices. In this article, we will first discuss the way you have most likely used the view layer in the past few years: JSP. We will see the bad and better ways to work with them (plain JSP, JSP with custom tags, Apache Tiles). We will then discuss a new project called Thymeleaf, which you can use as an alternate approach to JSP. As usual, you can find all the code samples discussed in the corresponding application on github. This code sample is not exactly “state of the art” in the sense that it could have been written…
I was thrilled to see in a recent survey from zeroturnaround that Spring MVC was voted the most popular web framework for Java. This framework is very flexible and there are dozens of ways to use it. As with all flexible frameworks that have many options, it is important to discuss common practices. The project I have created for this blog entry uses features common in many Spring MVC applications. You will find something like this: In controllers you will find typical Spring MVC features for mapping requests, extracting request data through annotations, data binding, file upload… On the…
In the Spring framework, many technical features rely on proxy usage. We are going to go in depth on this topic using three examples: Transactions, Caching and Java Configuration. All the code samples shown in this blog entry are available on my github account. Since the method “create” is not transactional, it will most likely throw an exception (because this Account object should not be persisted outside of a transaction). Here is what we have at runtime:
And here is the corresponding Spring configuration: Inside Spring generic configuration, we have used . It…