how to customize and create Spring Security JDBC custom tables

2 weeks ago 29
ARTICLE AD BOX

I am working on an auth service and using spring boot 4, Spring security 7 and using a postgres database to authenticate users using my auth service
One problem im running into is that jdbc requires you to have the users and authorities table present in your database. I created these tables by creating a schema.sql file and configuring sql-init property to automatically create the tables when the app starts.
I want to know if theres a way to automatically have these 2 tables created for me without me having to define the schema.

If i do not want to use the default Users table - like i want to rather name my table "customers" instead and have jdbc and spring security use that for my authentication and user data persistence purpoeses how can i do that?

Read Entire Article