Soap WebService NTLM Authentication with Apache CXF and Spring
Recently I had the “chance” to consume an old school WebService in good old SOAP on top of that it was a C# WebService using the dataset construct which is in itself a world of pain… but we will not talk about that here A…
Spring application events lifecycle and earlyApplicationEvents
Not long ago I learned the hard way the way spring handles earlyApplication events when we started having problems in one of our projects Basically we were using a MongoDB database as a cache layer, so when the application would startup we would pull most…
Working with stateless session in hibernate and jpa
When doing heavy read-only operations in with the database it can be a good idea to take advantage of using Hibernate’s Stateless Session As it name indicates this session does not keep state of the entities that it retrieves from the database and so it…
Serving angular2 content from Spring Boot application
Recently I had to ship an Angular2/Angular4 application within a Spring boot WAR packaged application and I was having some issues when dealing with the the urls in the angular routes, since it goes through the DispatcherServlet I was getting 404 all over the place…
Custom converter for Mongodb and Spring Data for BigDecimal type
Recently I found that MongoDB does not support java’s java.math.BigDecimal as you can read in the official spring data mongodb documentation As it turns out java.math.BigDecimal will be converted to java.lang.String when saved to the database and parsed back to BigDecimal which in most cases…
Spring boot and mongodb with geo-localisation queries 1/3
MongoDB offers a number of indexes and query mechanisms to handle geospatial information, below are some of the features offered by the database : Surfaces Location Data Query Operations Geospatial indexes ….. More detailed information can be found at their website : MongoDB Geospatial queries…
Spring mvc send binary content from controller
Sometimes binary files such as images, documents are stored in the database; these binary files need then to be served dynamically Below I’ll show a code snippet showing how to handle this easily with Spring MVC Before we begin just in case this is the…