spring boot project configuration
application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/account
spring.datasource.username=postgres
spring.datasource.password=3152004
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Postgr
eSQL81Dialect
server.error.include-message=always
Configuration
@Bean
CommandLineRunner commandLineRunner(AccountRepository
repository){
return args -> {
repository.saveAll(List.of(
new Account(
"anh",
"Quang Anh",
"anhcrafter@gmail.com",
"15a myHome short street, tp Ba Ria, BR-VT",
"098563957"
),
new Account(
"binh",
"Thanh Binh",
"binhnguyen@gmail.com",
"564 myHome ago street, tp Vung tau, BR-VT",
"093567396"
)
));
};
}

spring boot project configuration - cấu hình

  • 1.
    spring boot projectconfiguration application.properties spring.datasource.url=jdbc:postgresql://localhost:5432/account spring.datasource.username=postgres spring.datasource.password=3152004 spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Postgr eSQL81Dialect server.error.include-message=always Configuration @Bean CommandLineRunner commandLineRunner(AccountRepository repository){ return args -> { repository.saveAll(List.of( new Account( "anh", "Quang Anh", "anhcrafter@gmail.com", "15a myHome short street, tp Ba Ria, BR-VT", "098563957" ), new Account( "binh", "Thanh Binh", "binhnguyen@gmail.com", "564 myHome ago street, tp Vung tau, BR-VT", "093567396"
  • 2.