创建表报Process finished with exit code 1
//Girl
package com.imooc.demo; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class Girl { @Id @GeneratedValue private Integer id; private String cuoSize; private Integer age; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCuoSize() { return cuoSize; } public void setCuoSize(String cuoSize) { this.cuoSize = cuoSize; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } }
配置文件
spring.profiles.active=prod spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc.mysql://127.0.0.1:3306/soft1602 spring.datasource.username=soft1602 spring.datasource.password=123456asd spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true 启动 package com.imooc.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class GirlApplication { public static void main(String[] args) { SpringApplication.run(GirlApplication.class, args); } }