为了账号安全,请及时绑定邮箱和手机立即绑定

jpa无法自动创建数据库表

jpa无法自动创建数据库表

胡子哥哥 2019-02-21 19:49:20
下面是配置信息: spring.jpa: show-sql: true database: MYSQL properties.hibernate.dialect: org.hibernate.dialect.MySQL5Dialect hibernate: ddl-auto: update naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy spring.datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.1.115/ssm?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&serverTimezone=CTT username: admin password: 123456 initial-size: 10 max-wait: 10000 maximum-pool-size: 100 max-active: 100 max-idle: 10 minIdle: 2 test-on-borrow: false test-on-return: true test-while-idle: true validation-query: select 1 下面是实体类: @Entity @Table(name = "ssm_icon") public class Icon { /** * 主键id */ @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; /** * 图标名称 */ @Column(name = "icon_name") private String iconName; /** * 图标地址 */ @Column(name = "icon_address") private String iconAddress; /** * 图标编码 */ @Column(name = "icon_code") private String iconCode; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getIconName() { return iconName; } public void setIconName(String iconName) { this.iconName = iconName; } public String getIconAddress() { return iconAddress; } public void setIconAddress(String iconAddress) { this.iconAddress = iconAddress; } public String getIconCode() { return iconCode; } public void setIconCode(String iconCode) { this.iconCode = iconCode; } } 今天新建的一个srping boot项目无法jpa无法自动生成数据库表,把ddl-auto 换成create也不行,哪位大神可以帮忙看看是什么原因吗
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 825 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信