Cristian Greco's Notes

I like to use a standard .properties file in my Spring projects as it's a central place where I store configuration parameters. Knowing this, I'm able to quickly add/edit/delete properties which take effect throughout my Spring project. Another advantage of course being that you don't need technical know-how to modify a properties file, seeing that it's in plain text. So how do we create and use a properties file within a Spring project? Let's get started.

Continue Reading

So you've probably come here because you've realised that Java doesn't come with a simple Nl2Br method, similar to the one you get in PHP. We'll be creating a tag library which implements a Nl2Br method, so that we conform with our MVC architecture, whereby modifications to any output are done in the View. So let's begin.

Continue Reading

One of the requirements I had when creating this blog was being able to search for articles by month and year, as you can see in the 'Archives' sidebar to the right. However despite searching furiously for the answer online, I came up with nothing, so got started doing it myself. The objective is being able to specify a year and a month to search for, and Spring will then query Mongo's 'createdDate' ISODate field for all data within that date range. For example 09/2013 would return all articles written in September 2013. If that's what you're here for, let's get started.

Continue Reading

Previous Page · 1 of 2 · Next Page