I started to learn spring boot and now currently working on a simple authentication project. But I have a problem. Database is always initialized. I configure application properties like this.
spring.datasource.initialization-mode=never
spring.jpa.open-in-view=false
spring.thymeleaf.cache=false
I set initialization-model "never". But it does not work.
Db is consist of two tables: users and roles.
Of course users and roles has ManyToMany relation and has user_role table.
public class User {
//...
@ManyToMany(cascade=CascadeType.ALL)
@JoinTable(name="user_role", joinColumns = @JoinColumn(name="user_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name="role_id" , referencedColumnName = "role_id"))
private Set<Role> roles;
}
What could be a problem?