下面是配置信息:
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
下面是實(shí)體類:
@Entity
@Table(name = "ssm_icon")
public class Icon {
/**
* 主鍵id
*/
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
/**
* 圖標(biāo)名稱
*/
@Column(name = "icon_name")
private String iconName;
/**
* 圖標(biāo)地址
*/
@Column(name = "icon_address")
private String iconAddress;
/**
* 圖標(biāo)編碼
*/
@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;
}
}
今天新建的一個(gè)srping boot項(xiàng)目無(wú)法jpa無(wú)法自動(dòng)生成數(shù)據(jù)庫(kù)表,把ddl-auto 換成create也不行,哪位大神可以幫忙看看是什么原因嗎
添加回答
舉報(bào)
0/150
提交
取消