Spring Boot and production mode no components rendered

If I start my Spring Boot app with:

java -jar app.jar

Everything works but I assume that this is not production mode.

But with:

java -Dvaadin.productionMode=true -jar app.jar

I see empty components.

In the Browser console I can see:

login:1 Refused to execute script from 'http://localhost:9090/login' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
[Deprecation]
 HTML Imports is deprecated and will be removed in M73, around March 2019. Please use ES modules instead. See https://www.chromestatus.com/features/5144752345317376 for more details.
login:1 Refused to execute script from 'http://localhost:9090/login' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login:2 Uncaught Application ROOT-2521314 is already being initialized
initApplication @ login:2
(anonymous) @ login:2
(anonymous) @ login:2
login:10 Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
    at login:10
(anonymous) @ login:10
The script resource is behind a redirect, which is disallowed.
Failed to load resource: net::ERR_UNSAFE_REDIRECT

I found the problem.

There was a wrong Spring Security configuration that prevented some resources to load.
After setting Spring security like in the Bakery App Starter everything works!