简体   繁体   English

jOOQ,Java - 如何导入生成的java文件?

[英]jOOQ, Java - how to import generated java files?

I'm in the 4th step of this tutorial: http://www.jooq.org/doc/3.3/manual/getting-started/tutorials/jooq-in-7-steps/jooq-in-7-steps-step4/ 我是本教程的第4步: http//www.jooq.org/doc/3.3/manual/getting-started/tutorials/jooq-in-7-steps/jooq-in-7-steps-step4 /

I generated files from step 3 and put them in src directory in my Java project but it seems that IDE can't find it: 我从第3步生成文件并将它们放在我的Java项目的src目录中,但似乎IDE无法找到它:

在此输入图像描述

在此输入图像描述

If you don't want to repeat the steps mentioned in your workaround every time, you should probably change your jOOQ code generation configuration to generate classes in your desired location: 如果您不希望每次都重复解决方法中提到的步骤,则应该更改jOOQ代码生成配置以在所需位置生成类:

<configuration>
  ...
  <generator>
    ...
    <target>
      <!-- use the appropriate location here -->
      <directory>src/main/java</directory>
      ...
    </target>
  </generator>
</configuration>
  1. Move database directory to src/main/java. database目录移动到src / main / java。
  2. Make sure that the package name in moved files is correct. 确保移动文件中的包名称正确无误。
  3. Reload project 重新加载项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM