Monthly Archives: February 2013

Troubleshooting Spring @Cacheable

I had a method that had been cached before, but stopped working after being refactored. The method cached application properties that were being read from a webdav repository. I noticed while debugging some other production code that the properties file … Continue reading

Posted in Ehcache, Java, Spring | Tagged , , , , | Leave a comment

AmazonWS and Spring

We had an existing web application that needed to handle images being stored in AmazonWS. Here is what I needed to do to add the new functionality. Add the AmazonWS Maven dependency Create the files that contain the AmazonWS credentials. … Continue reading

Posted in Java, JUnit, Maven, Spring | Leave a comment

Finally had a need to configure Spring by java code

All of my projects already configured spring via the context xml files. I know they support configuration by @Configuration annotated java classes. I never used it, because I never had a need. The context file is simple and easy to … Continue reading

Posted in Java, Spring | Leave a comment

Refactoring with Generics

I wrote a utility method that used httpclient to retrieve a text file for me. Then I had a need to retrieve a binary file. I ended up with two methods that were very similar. I am a DRY advocate … Continue reading

Posted in Java | Tagged , , | Leave a comment

Tired of Maven plugins running all the time?

Updated on 2013/08/22 I added the maven-source-plugin and the maven-javadoc-plugin to my projects. Great idea, but building the source and javadoc jar every time was increasing my build times. The solution is to specify a phase, then it will only … Continue reading

Posted in Maven | 1 Comment

Tired of typing the Fully Qualified Domain Name (FQDN)?

When my OS was upgraded, I had to start typing the FQDN for all of the servers I used for work. I knew it had something to do with /etc/hosts on other Linux machines. The file that needs to be … Continue reading

Posted in Mac, OS/X | Tagged , , , | Leave a comment