Guest User

Untitled

a guest
Feb 3rd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. Target l_target = new Target();
  2. System.out.println("My directory is::"+l_target.getPackageName());
  3. l_target.setDirectory("src/main/java");
  4. l_target.setPackageName("com.my.paas.css.entity");
  5. Configuration configuration = new Configuration()
  6. .withJdbc(new Jdbc()
  7. .withDriver("com.mysql.jdbc.Driver")
  8. .withUrl("jdbc:mysql://localhost:3306/paas")
  9. .withUser("root"))
  10. .withGenerator(new Generator()
  11. .withDatabase(new Database()
  12. .withName("org.jooq.meta.mysql.MySQLDatabase")
  13. .withIncludes(".*")
  14. .withExcludes("")
  15. .withInputSchema("paas"))
  16. .withTarget(l_target));
  17.  
  18. try {
  19. GenerationTool.generate(configuration);
  20. } catch (Exception ex) {
  21. System.out.println();
  22. ex.printStackTrace();
  23. }
  24. }
Add Comment
Please, Sign In to add comment