小编Moh*_*hia的帖子

application.properties 中 spring.jpa.hibernate.ddl-auto=update 的问题

我的文件有问题application.properties,在这一行:

spring.jpa.hibernate.ddl-auto=update
Run Code Online (Sandbox Code Playgroud)

当我从实体中删除某些属性时,这些属性仍保留在数据库中。

这是 application.properties 的副本:

spring.jpa.generate-ddl=true
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect = 
org.hibernate.dialect.MySQL5Dialect
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/taskmanagement
spring.datasource.username = root
spring.datasource.password = 
server.port=89
spring.data.rest.default-media-type= application/json
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

java database spring spring-data spring-data-jpa

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

database ×1

java ×1

spring ×1

spring-data ×1

spring-data-jpa ×1