Java tips, observations, bugs and problems from the world of Spring, Weblogic, Oracle, MySQL and many other technologies...
Showing posts with label Formatting. Show all posts
Showing posts with label Formatting. Show all posts
Friday, 19 August 2011
Code Formatting in Agile Teams
Whether you work in an Agile team or not, one of the crucial aspects of team work is agreeing your team's code formatting rules. You may wonder why I’m using the word crucial when introducing this topic and the answer lies in the consequences of not using a common style.
Labels:
Agile,
eclipse,
Formatting,
Java,
Style,
Team Management
Wednesday, 10 August 2011
@DateTimeFormat Depends on Joda Time
Yesterday’s blog explained the use of the @DateTimeFormat and whilst writing it, I purposely chose to use java.util.Calendar for simplicity as I didn’t want to add an unnecessary dependency into my classpath... and that’s where I came unstuck. I turns out that if you don’t have the following dependency in your POM:
Labels:
Annotations,
Formatting,
Java,
Spring
Tuesday, 9 August 2011
Using the Spring 3 @DateTimeFormat Annotation
@DateTimeFormat is the complimentary annotation to yesterday’s @NumberFormat and like @NumberFormat it does what it says on the tin and allows you to format dates and times. The Spring javadoc states that it can be applied to java.util.Date, java.util.Calendar, java.long.Long, or Joda Time classes and works on dates sent to the presentation layer from the controller and visa-versa.
Labels:
Annotations,
Formatting,
Java,
Spring
Monday, 8 August 2011
Using Spring 3 @NumberFormat Annotation
The Guys as Spring have provided a very useful annotation called @NumberFormat that allows you to, well... format numbers. It works on numbers sent to the presentation layer from the controller and visa-versa and can be applied to any class derived from java.lang.Number. It will format numbers into three styles as defined by the NumberFormat.Style enum: CURRENCY, PERCENT and NUMBER.
Labels:
Annotations,
Formatting,
Java,
Spring
Subscribe to:
Posts (Atom)