开发者社区> 问答> 正文

JPA helper的安装教程是什么啊?

已解决

JPA helper的安装教程是什么啊?

展开
收起
游客ksbtr3hoxwpzi 2022-08-13 14:38:35 705 0
1 条回答
写回答
取消 提交回答
  • 推荐回答

    引入maven库 cn.craccd jpaHelper 0.3.1 在有@Configuration的类上添加注解 @ComponentScan("cn.cucc") @Configuration public class WebConfig {

    } 在application.yml文件中加入如下配置 spring: datasource: #数据库配置(jpa会根据url协议自动判断数据库类型) url: jdbc:postgresql://xxx.xxx.xxx.xxx:5432/database username: postgres password: postgres jpa: properties: hibernate.globally_quoted_identifiers: true #对jpa sql关键字进行转义 hibernate.globally_quoted_identifiers_skip_column_definitions: true #不要对字段类型进行转义 hibernate: ddl-auto: update #自动更新数据库表,如不需要自动更新数据库,则取消此参数

    2022-08-13 14:43:46
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载