In this post I will present how to log in a Spring based application with the help of Simple Logging Facade for Java (SLF4J) and Logback. For demonstration I will use the application presented in the post Tutorial – REST API design and implementation in Java with Jersey and Spring, to which I will add now logging capabilities.
In this post I will show you how to setup two or more data sources in a Spring application where the access to the database is done via JPA. It will be a XML-based Spring configuration. To highlight the setup I will use a showcase that builds on an existing demo example I have committed on GitHub, that covers other two posts of mine
Don’t worry! You don’t have to understand what’s going on in those if you just want to see how the setup for multiple data sources looks like – I’ll do a quick introduction in the first part of the post.
One thing I immediately needed when using GIT/EGit instead of Subversion/Subversive in Eclipse, was the possibility to quickly revert the changes I made to a file. The good news is that with EGit it goes just as fast…
- Subversive – right click on file > Team > Revert…
- EGit – right click on file > Replace With > File in Git Index
There are quite often situations, when you’d need to add or substract a time period to a date when you are accessing the database via Java Persistence API(JPA). Now
It was about “time”…
by Ben Evans and Richard Warburton