Category Archives: Java

Gradle vs Maven

Short story Don’t use gradle. Use maven. A little longer story Don’t use gradle until you really have to. Otherwise use maven. Long story Last time I was dropped into a project that was using gradle. And it was the … Continue reading

Posted in Java | Tagged , | 1 Comment

Spring Boot configuration for Tomcat’s pooling data source

In one of projects I was just working on in my professional career I’ve faced the problem of a Spring Boot configuration for a Tomcat’s database connection pool. The main issue was that after some time the pool was giving … Continue reading

Posted in database, Java, Spring, Tomcat | Tagged , | 1 Comment

RestTemplate and <mvc:message-converters> in Spring Framework 4.3

The Spring Framework’s documentation says that RestTemplate instance created by the default constructor gets the default set of HttpMessageConverters. But what is the default set of HttpMessageConverters? Well, this is defined in the Spring Framework Reference. Unfortunately I’ve missed it … Continue reading

Posted in Java, Spring | Tagged | Leave a comment

Google App Engine, Java, JPA 2, Spring Framework, Maven

DISCLAIMER: This was going (in 2014!) to be a full tutorial but at some point I’ve lost motivation in digging in the Google App Engine. Actually I was so tired with this GAE data store that I felt really relieved … Continue reading

Posted in GoogleAppEngine, Java, Spring | Tagged , , | 1 Comment

RSA signatures in Java with Bouncy Castle

This is a complete guide, starting from RSA key pair generation into PEM files, through loading private/public keys from files into proper Bouncy Castle objects, to digital signature creation and verification – all using Bouncy Castle. No JCA. How to … Continue reading

Posted in Java, security | Tagged , | Leave a comment

Sequence of digits from natural numbers

Around a year ago I was taking a part, as a candidate, in a recruitment process in one of the world’s biggest and most innovative software companies. One question was to propose an algorithm to solve the following problem: Given … Continue reading

Posted in Java | Tagged , | Leave a comment

EasyMock vs Mockito

Just wanted to share my personal opinion on these 2 great mocking frameworks for Java. After years of experience with both of them… …I say Mockito is better. Mainly because it requires less code to do the same. I don’t … Continue reading

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