Skip to content

Use %TABLE_NAME% placeholders in JdbcIndexedSessionRepository schema scripts #2225

Open
@philwebb

Description

@philwebb

Expected Behavior
Currently schema SQL files shipped in org.springframework.session.jdbc have hard-coded table names despite JdbcIndexedSessionRepository offering a setTableName method.

It would be helpful if the scripts could use %TABLE_NAME% placeholders much like the SQL defined in JdbcIndexedSessionRepository constants. That way the schema could be modified before it's run to generate expected table names.

Current Behavior
Scripts always generate tables with the name or prefix SPRING_SESSION.

Context
See spring-projects/spring-boot#33748 for background.

I'm not sure if changing the SQL will break existing users since they'll need to remember to perform the search and replace. Perhaps a utility method could be provided to take care of this.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions