-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ java instead of xml in jooq codegen #198
- Loading branch information
Showing
6 changed files
with
122 additions
and
8 deletions.
There are no files selected for viewing
Submodule docs
updated
2 files
+22 −0 | src/0-wings/0c-dev-tool.md | |
+21 −0 | src/zh/0-wings/0c-dev-tool.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ss-codegen/src/test/java/pro/fessional/wings/faceless/jooqgen/WingsCodeGeneratorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package pro.fessional.wings.faceless.jooqgen; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.jooq.meta.jaxb.Configuration; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* @author trydofor | ||
* @since 2024-02-01 | ||
*/ | ||
@Slf4j | ||
class WingsCodeGeneratorTest { | ||
|
||
@Test | ||
void config() { | ||
Configuration c1 = WingsCodeGenerator.config(); | ||
Configuration c2 = WingsCodeGenerator.config(WingsCodeGeneratorTest.class.getResourceAsStream("/wings-flywave/jooq-codegen-faceless.xml")); | ||
String s1 = c1.toString(); | ||
String s2 = c2.toString(); | ||
log.debug("java config={}", s1); | ||
log.debug("xml config={}", s2); | ||
Assertions.assertEquals(format(s1), format(s2)); | ||
} | ||
|
||
String format(String str){ | ||
return str.replaceAll("\\s+", "").replace("<","\n<"); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...s/wings-flywave/jooq-codegen-faceless.xml → ...s/wings-flywave/jooq-codegen-faceless.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters