Skip to content

数据库可以使用bean注入的方式 使用@column注解 #14

Open
@MAXIAODONGS

Description

@MAXIAODONGS

在application.yml中配置
jpa: database: mysql hibernate: ddl-auto: update show-sql: true
实体类中
@Entity public class OrderDetail implements Serializable { @Id private String detailId; /** * 订单id */ @Column private String orderId;

上面这种实现后方便操作不需要建表 创建一个库就行 我已经将修改过的代码提交的我的库里 希望可以相互学习一下

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions