springboot集成jooq异常集合

环境背景:jdk13、apache-maven-3.6.2、IDEA2019.2.4、springboot-2.2.0.RELEASE、jooq3.12.2

一、Error running jOOQ code generation tool

1. 异常背景:通过jooq-codegen-maven插件生成代码时报错

2. 异常详情

Failed to execute goal org.jooq:jooq-codegen-maven:3.12.2:generate (default-cli) on project jooq: Error running jOOQ code generation tool

3. 异常原因:在pom.xml文件中,通过yaml-properties-maven-plugin插件读取application.yml配置文件中内容,直接操作jooq-codegen-maven插件无效

4. 解决方法:

4.1 方法1:通过maven,执行mvn compile命令

4.1.1 查看效果

E:\jdk\jdk-13.0.1\bin\java.exe -Dmaven.multiModuleProjectDirectory=F:\IdeaProjects\jooq -Dmaven.home=E:\maven\apache-maven-3.6.2 -Dclassworlds.conf=E:\maven\apache-maven-3.6.2\bin\m2.conf "-Dmaven.ext.class.path=E:\JetBrains\IntelliJ IDEA 2019.2.3\plugins\maven\lib\maven-event-listener.jar" -Dfile.encoding=UTF-8 -classpath E:\maven\apache-maven-3.6.2\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version2019.2.4 -s E:\maven\apache-maven-3.6.2\conf\settings.xml compile
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.zsx:jooq:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.scope' for org.springframework.boot:spring-boot-devtools:jar must be one of [provided, compile, runtime, test, system] but is 'true'. @ line 105, column 20
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] ----------------------------< com.zsx:jooq >----------------------------
[INFO] Building jooq 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- yaml-properties-maven-plugin:1.1.3:read-project-properties (default) @ jooq ---
[INFO] 
[INFO] --- jooq-codegen-maven:3.12.2:generate (default) @ jooq ---
[INFO] No <inputCatalog/> was provided. Generating ALL available catalogs instead.
[INFO] License parameters       
[INFO] ----------------------------------------------------------
[INFO]   Thank you for using jOOQ and jOOQ's code generator
[INFO]                          
[INFO] Database parameters      
[INFO] ----------------------------------------------------------
[INFO]   dialect                : POSTGRES
[INFO]   URL                    : jdbc:postgresql://127.0.0.1:5432/mydb11
[INFO]   target dir             : F:\IdeaProjects\jooq\src\main\java
[INFO]   target package         : com.zsx.generator.jooq
[INFO]   includes               : [.*]
[INFO]   excludes               : []
[INFO]   includeExcludeColumns  : false
[INFO] ----------------------------------------------------------
[INFO]                          
[INFO] JavaGenerator parameters 
[INFO] ----------------------------------------------------------
[INFO]   annotations (generated): true
[INFO]   annotations (JPA: any) : false
[INFO]   annotations (JPA: version): 
[INFO]   annotations (validation): false
[INFO]   comments               : true
[INFO]   comments on attributes : true
[INFO]   comments on catalogs   : true
[INFO]   comments on columns    : true
[INFO]   comments on keys       : true
[INFO]   comments on links      : true
[INFO]   comments on packages   : true
[INFO]   comments on parameters : true
[INFO]   comments on queues     : true
[INFO]   comments on routines   : true
[INFO]   comments on schemas    : true
[INFO]   comments on sequences  : true
[INFO]   comments on tables     : true
[INFO]   comments on udts       : true
[INFO]   daos                   : false
[INFO]   deprecated code        : true
[INFO]   global references (any): true
[INFO]   global references (catalogs): true
[INFO]   global references (keys): true
[INFO]   global references (links): true
[INFO]   global references (queues): true
[INFO]   global references (routines): true
[INFO]   global references (schemas): true
[INFO]   global references (sequences): true
[INFO]   global references (tables): true
[INFO]   global references (udts): true
[INFO]   indexes                : true
[INFO]   instance fields        : true
[INFO]   interfaces             : false
[INFO]   interfaces (immutable) : false
[INFO]   javadoc                : true
[INFO]   keys                   : true
[INFO]   links                  : true
[INFO]   pojos                  : false
[INFO]   pojos (immutable)      : false
[INFO]   queues                 : true
[INFO]   records                : true
[INFO]   routines               : true
[INFO]   sequences              : true
[INFO]   table-valued functions : true
[INFO]   tables                 : true
[INFO]   udts                   : true
[INFO]   relations              : true
[INFO] ----------------------------------------------------------
[INFO]                          
[INFO] Generation remarks       
[INFO] ----------------------------------------------------------
[INFO]                          
[INFO] ----------------------------------------------------------
[INFO] Generating catalogs      : Total: 1
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jooq.tools.reflect.Reflect (file:/E:/maven/repository/org/jooq/jooq/3.12.2/jooq-3.12.2.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class)
WARNING: Please consider reporting this to the maintainers of org.jooq.tools.reflect.Reflect
WARNING: Use --illegal-access=
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值