jdbc `initialize-schema` creates table with default name, not the one from `table-name` property
See original GitHub issueSpring Session JDBC when requested to always
initialize schema, creates tables named with default name (SPRING_SESSION
) even when table-name
param is overriding this name. Later at runtime, tables defined in table-name
are missing, because not created by Spring Session.
Full config of SpringSession:
spring.session:
store-type: jdbc
jdbc:
table-name: SPRING_SESSION_V2
initialize-schema: always
version: 2.1.0.RELEASE
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to initialize schema in spring-session with JDBC
I am describing the steps.It worked for me. 1- Add the dependency in your pom file. <dependency> <groupId>org.springframework.session</groupId> ...
Read more >JDBC producer ${record:attribute('tablename')} not exist, but ...
The JDBC Producer puts the table name in the jdbc.tables attribute. If you preview with record/field headers enabled, you should see the table...
Read more >86. Database Initialization - Spring
Spring Boot chooses a default value for you based on whether it thinks your database is embedded. It defaults to create-drop if no...
Read more >Db2 12 - Db2 SQL - ALTER TABLE - IBM
Specifies the default value that is assigned to the column in the absence of a value specified in a data change statement, or...
Read more >Storing Spring Sessions in Database using JDBC - SpringHow
First, you need to add the spring session jdbc to your spring ... the default table names using spring.session.jdbc.table-name property.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ok, If you say so.
It was pretty intuitive for me that when I can set the
table-name
and force toinitialize-schema
which works with the default names, it should also work with custom names.so maybe your explanations could be included in docs? An this issue is more like a feature request.
Closing as I believe I’ve provided you with pointers to relevant info which explains how things are implemented.
As noted in the previous comment, that request should be opened against Spring Boot.