post 新增时主键id格式报错: Unknown integral data type for ids : java.lang.String;
在Gril实体内,在id上加注解,主键换成uuid就行
@Id @GeneratedValue(generator="system-uuid")
@GenericGenerator(name="system-uuid", strategy = "uuid")
private String id;
在Gril实体内,在id上加注解,主键换成uuid就行
@Id @GeneratedValue(generator="system-uuid")
@GenericGenerator(name="system-uuid", strategy = "uuid")
private String id;
2018-04-26
application.yml配置
spring:
profiles:
active: prod
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/pusamm
username: root
password: 123
jpa:
hibernate:
ddl-auto: create
show-sql: true
spring:
profiles:
active: prod
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/pusamm
username: root
password: 123
jpa:
hibernate:
ddl-auto: create
show-sql: true
2018-04-25
没有@Entity,@Id注解的,
当 pom.xml添加完代码后,
记得用maven更新本地仓的依赖jar包
在pom.xml中右键 -> maven -> reimport
当 pom.xml添加完代码后,
记得用maven更新本地仓的依赖jar包
在pom.xml中右键 -> maven -> reimport
2018-04-25
启动方式:1.idea工具内run
2.cmd进入项目目录输入mvn spring-boot:run
3.cmd进入项目目录-->mvn install-->进入target文件夹--->java -jar 刚生成的jar包文件名
2.cmd进入项目目录输入mvn spring-boot:run
3.cmd进入项目目录-->mvn install-->进入target文件夹--->java -jar 刚生成的jar包文件名
2018-04-25
spring boot连接jpa Cannot load driver class: com.mysql.jdbc.Driver
改变mysql依赖包的版本为较低版本。默认为最新版本,可能不支持
改变mysql依赖包的版本为较低版本。默认为最新版本,可能不支持
2018-04-25