Workaround for missing DomainClassConverter in Spring Boot JUnit tests

In one of my projects I let Spring Boot automatically bind domain objects from the database.

This fails in the reduced unit test setup, because DomainClassConverter is not available. But it can be mocked!

weiterlesen

Avoid conversion warnings when using yedit ansible role

When I fist started to use yedit to modify YAML files I got the following warning:

[WARNING]: The value {...} (type dict) in a string field was converted to "{...}" (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

 

weiterlesen

Shrinking LVM physical volume running on software RAID

Due to a misconfiguration I had to shrink a LVM 2 volume group and its physical volume running on a software RAID.

weiterlesen

Formatting phone numbers using libphonenumber in Thymeleaf

The Google phone number parser & formatter is very helpful to ensure the same number format for user prodived data. To simplify the use in Spring Boot application with Thymeleaf I created a wrapping TagLib/ExpressionFactory.

weiterlesen

Samsung SSD as Linux Software RAID

Initially I thought adding a pair of Samsung 860 EVO as software RAID to my small home server cannot be too hard...

... but they seem to require special kernel settings to work.

weiterlesen

Setup Unifi Controller on Debian 10 / Buster

The requirements of the Unifi Controller do not allow a direct installation. But with a few manual steps a successful setup is possible!

weiterlesen

How to ensure you get a BindingResult instead of whitelabel error page when validating input

When I started to use Spring Boot I had some issues with the validation. The @Validated annotation triggered the validation as requested but the validation terminated with an org.springframework.validation.BindException instead of filling the BindingResult object.

weiterlesen

Configure Java/JDBC to connect to PostgreSQL with JRE certificate validation

Using the PostgreSQL JDBC driver since 42.2.5, the SSL behaviour changed which can cause FileNotFoundExceptions looking for .postgresql/root.crt.

weiterlesen

Configure Apache as Proxy for Thumbor

On our default setup, we use Apache as proxy and load balancer for our applications. This usually works, but caused problems with Thumbor.

 

weiterlesen

Inject Attributes to Spring Boot Controller Methods (HandlerMethodArgumentResolver)

During learning Spring Boot I noticed attributes to methods in Spring Boot controllers can be automatically injected.

To migrate my blog from Grails to Spring Boot I created an implementation to inject the current blog instance based on an session attribute.

weiterlesen

Seite 1 von 5

© 2015 - 2019 Moritz Kobel

Theme by Anders NorenUp ↑