Ytug Ilya
Ytug Ilya

Reputation: 103

Spring stateMachine persistance with Jpa

I got a problem with persister configuration. The problem is similar to Spring State machine - Table Scripts , but I dont want to generate tables by myself or with liquibase. So I'd like to use StateMachineJpaRepositoriesAutoConfiguration but I can't find info how I should enable it. I already tried to use @ImportAutoConfiguration and do some stuff in property file, for example:

spring:
  statemachine:
    data:
      jpa:
        repositories:
          enabled: true

But, unfortunately It didn't work for me, and I still get the error:

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [action]

Maybe the way with StateMachineJpaRepositoriesAutoConfiguration is not suitable here, so I'm needed any advice

Upvotes: 0

Views: 431

Answers (1)

Ytug Ilya
Ytug Ilya

Reputation: 103

Tried to use embedded H2 and all the tables was created. So the problem was in my spring.jpa.hibernate settings. So it should be spring.jpa.generate-ddl=true and spring.jpa.hibernate.ddl-auto=create

Upvotes: 1

Related Questions