question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jdbc `initialize-schema` creates table with default name, not the one from `table-name` property

See original GitHub issue

Spring 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jm-ckcommented, Oct 30, 2018

ok, If you say so.

It was pretty intuitive for me that when I can set the table-name and force to initialize-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.

0reactions
vpaviccommented, Oct 30, 2018

Closing as I believe I’ve provided you with pointers to relevant info which explains how things are implemented.

so maybe your explanations could be included in docs? An this issue is more like a feature request.

As noted in the previous comment, that request should be opened against Spring Boot.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found