username: sa is not read when SPRING_DATASOURCE_USERNAME is defined

31 views
Skip to first unread message

Manas Marthi

unread,
Jun 20, 2024, 3:33:40 AMJun 20
to H2 Database
Hi,

I have SPRING_DATASOURCE_USERNAME and PASSWORD environment variables defined

In a spring boot app, I defined a in memory db in application.yml file

I specified username: sa, and gave no password.

For one day it worked fine. The next day onwards I was unable to login via http://localhost:8080/h2-console.

when I debug and step through h2 code, I realized it defined a username and password using the above environment variables instead of sa

Is this expected behavior or bug?

thanks
Manas
Reply all
Reply to author
Forward
0 new messages