Why does the H2 console in Spring Boot show a blank screen after logging in?

According to a blog post, a line needs to be added to
the configure method of the SecurityConfig class if you have the spring-boot-starter-security dependency in your project, otherwise you will see an empty page after logging into the H2 console:

http.headers().frameOptions().disable();

I added that line and it solved the problem.

Alternatively, the following line can be used (as mentioned here):

http.headers().frameOptions().sameOrigin();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)