Отключил добавление дефолтных пользователей и включил сохраенение бд

This commit is contained in:
Никита Потапов 2024-05-14 12:11:07 +04:00
parent 392d88accf
commit 6df4cdebfc
2 changed files with 7 additions and 7 deletions

View File

@ -27,12 +27,12 @@ public class NekontakteApplication implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
_logger.info("Create default user values"); // _logger.info("Create default user values");
final var admin = new UserEntity( // final var admin = new UserEntity(
"admin", // "admin",
"admin", // "admin",
UserRole.ADMIN); // UserRole.ADMIN);
userService.create(admin); // userService.create(admin);
} }
} }

View File

@ -12,7 +12,7 @@ spring.datasource.url=jdbc:h2:file:./test
spring.datasource.username=sa spring.datasource.username=sa
spring.datasource.password=password spring.datasource.password=password
spring.datasource.driver-class-name=org.h2.Driver spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.hibernate.ddl-auto=create spring.jpa.hibernate.ddl-auto=update
spring.jpa.open-in-view=false spring.jpa.open-in-view=false
# spring.jpa.show-sql=true # spring.jpa.show-sql=true
# spring.jpa.properties.hibernate.format_sql=true # spring.jpa.properties.hibernate.format_sql=true