[英]Spring boot parameter update model Database don't work
i set the value to update value so that a table will be created in the database automatically corresponding to defined data model.我将值设置为更新值,以便在数据库中创建一个表,自动对应于定义的数据 model。 But it does not work, what it wrong with my properties?但它不起作用,我的属性有什么问题? Database: Mysql数据库:Mysql
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.servlet.multipart.max-file-size=2MB
spring.servlet.multipart.max-request-size=2MB
server.port=8081
server.servlet.session.timeout=1200
spring.datasource.url=jdbc:mysql://localhost:3306/test?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC
spring.datasource.username= root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.properties.hibernate.storage.storage_engine=innodb
spring.security.user.name="root"
spring.security.user.password="123"
spring.resources.add-mappings=true
java.sql.SQLSyntaxErrorException: Table 'test.files' doesn't exist
What genereted conflict with "spring.jpa.hibernate.ddl-auto=update"与“spring.jpa.hibernate.ddl-auto=update”发生了什么冲突
Make sure the database connection string is valid.确保数据库连接字符串有效。 Try changing spring.datasource.url=jdbc:mysql://localhost:3306/test?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC
尝试更改spring.datasource.url=jdbc:mysql://localhost:3306/test?useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=UTC
The name of your database is "test" but is it really?您的数据库的名称是“测试”,但它是真的吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.