Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbai00 committed Dec 16, 2024
1 parent 8389563 commit dbf6417
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@ object JooqCodeGenerator {
@throws[Exception]
def main(args: Array[String]): Unit = {
// Path to jOOQ configuration XML
val jooqXmlPath: Path = Path.of("dao").resolve("src").resolve("main").resolve("resources").resolve("jooq-conf.xml")
val jooqXmlPath: Path =
Path.of("dao").resolve("src").resolve("main").resolve("resources").resolve("jooq-conf.xml")
val jooqConfig: Configuration = GenerationTool.load(Files.newInputStream(jooqXmlPath))
// Path to the YAML configuration file
val yamlConfPath: Path = Path.of("workflow-core").resolve("src").resolve("main").resolve("resources").resolve("storage-config.yaml")
val yamlConfPath: Path = Path
.of("workflow-core")
.resolve("src")
.resolve("main")
.resolve("resources")
.resolve("storage-config.yaml")
// Load YAML configuration
val yaml: Yaml = new Yaml
try {
val inputStream: InputStream = Files.newInputStream(yamlConfPath)
try {
val config: Map[String, AnyRef] = yaml.load(inputStream)
val jdbcConfigMap: Map[String, AnyRef] = (config.get("storage").asInstanceOf[Map[String, AnyRef]]).get("jdbc").asInstanceOf[Map[String, AnyRef]]
val jdbcConfigMap: Map[String, AnyRef] = (config
.get("storage")
.asInstanceOf[Map[String, AnyRef]])
.get("jdbc")
.asInstanceOf[Map[String, AnyRef]]
// Set JDBC configuration for jOOQ
val jooqJdbcConfig: Jdbc = new Jdbc
jooqJdbcConfig.setDriver("com.mysql.cj.jdbc.Driver")
Expand Down

0 comments on commit dbf6417

Please sign in to comment.