server:
port: 8080
context-path: /springboot
girl:
name: B
age: 18
content: content:${name},age:${age}
spring:
profiles:
active: prod
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/xzy?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
username: root
password: 123
jpa:
hibernate:
ddl-auto: create
show-sql: true
yml 爆红:
server:
port: 8080
context-path: /springboot
girl:
name: B
age: 18
content: content:${name},age:${age}
spring:
profiles:
active: prod
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/xzy?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
username: root
password: 123
jpa:
hibernate:
ddl-auto: create
show-sql: true
package com.model;
@Entity
public class Girl {
@Id
@GeneratedValue
private Integer id;
private String cupSize;
private Integer age;
public Girl() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getCupSize() {
return cupSize;
}
public void setCupSize(String cupSize) {
this.cupSize = cupSize;
}
}