【发布时间】:2020-02-06 21:48:06
【问题描述】:
我正在尝试在 STS 4 中的 Spring boot 中执行 ORM,因此我创建实体然后配置 application.properties,如下所示:
spring.datasource.url = jdbc:mysql://localhost:3306/basebanque
spring.datasource.username = root
spring.datasource.password =
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.database= MYSQL
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5Dialect
和:
【问题讨论】:
-
控制台看起来不错。什么不起作用?
-
我在 ma 数据库中找不到表(即 java 类)。
-
你的实体是什么样子的?它们在包结构中的什么位置?
-
实体是javabean,我把它们放在一个名为entities的包中:src/main/java
-
您发布了日志图像而不是纯文本。请不要。
标签: spring spring-boot jpa orm