5 articles Spring Boot

Angular & Spring Boot

Problem We want to combine Spring and Angular use the Angular developing features but also be able to use the Spring IDE in the end everything should be build using maven and nicely packed into a JAR. Let’s get started. Overview Create a multi-module project Pack the frontend into an own JAR Include the frontend…

Spring Data MongoDB and JSR Validation using Lazy DBRef

The Problem Recently using MongoDB and Spring Data I encountered an interesting issue. Saving an Entity  which was loaded by @DBRef(lazy = true) wasn’t possible together with the activated ValidatingMongoEventListener. Each time the following error occurred:

The Issue Well looking into the details it is quite clear — as an dynamic proxy is passed to the validation which fields…

MariaDB and Spring Boot

Yaml Configuration

Important to notice hibernate.dialect must be set driver-class-name must be set it needs to be the MySQL5InnoDBDialect or MySQL57InnoDBDialect instead of the MySQLInnoDBDialect Dependencies in Maven

Use Session and Request Scope Beans in Tests with Spring

Sometimes it is useful haven the Web Scopes in Unit Tests. Usually Spring just show this very useful error in the Unit Test:

You can easily have all needed web scopes in your unit test by adding the following annotation to your Tests: @WebAppConfiguration. Now Web Scopes like:

will work.  

Spring Boot Configuration – Properties not loaded

I had recently a very interesting problem using Spring Boot and the auto magic concerning the configuration. The Problem

Configuration was not available in my Unit tests but it was working fine in the normal application. I spend a lot of time searching but without real good post concerning this issue. This code already…