Skip to content
Advertisement

After trying to test connection to h2 database or connect whitelabel error occurs

After running Spring boot project and going to localhost:8080/h2-console and after trying to connect to my database I get whitelabel error when i click any button on h2-console screen. I am using in memory database. I am trying to connect to database with classic username:sa and password:(blank) h2-console screen Even after clicking Save i get whitelabel error
application properties:

JavaScript

pom xml:

JavaScript

configure method WebSecurityConfig class:

JavaScript

Advertisement

Answer

After research i found out that spring security csrf blocks h2-console so what is needed to continue is to add next code to the WebSecurityConfig class

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement