Skip to content

Commit

Permalink
MyBatis Generator のライブラリバージョンをdependencies.gradleに配置する
Browse files Browse the repository at this point in the history
  • Loading branch information
rnakagawa16 committed Jan 30, 2025
1 parent 0627904 commit dafa738
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions samples/web-csr/dressca-backend/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ ext {
springdocOpenapiVersion = "2.8.1"
servletApiVersion = "6.1.0"
commonsLangVersion = "3.17.0"
springSecurity = "3.4.1"
springSecurityVersion = "3.4.1"
mybatisGeneratorVersion = "1.4.2"

supportDependencies = [
spring_boot_starter : "org.springframework.boot:spring-boot-starter",
Expand All @@ -24,7 +25,7 @@ ext {
spring_boot_starter_validation : "org.springframework.boot:spring-boot-starter-validation",
spring_boot_starter_web : "org.springframework.boot:spring-boot-starter-web",
spring_boot_starter_actuator : "org.springframework.boot:spring-boot-starter-actuator",
spring_boot_security_starter : "org.springframework.boot:spring-boot-starter-security:$springSecurity",
spring_boot_security_starter : "org.springframework.boot:spring-boot-starter-security:$springSecurityVersion",

spring_batch_test : "org.springframework.batch:spring-batch-test:$springBatchTestVersion",
springdoc_openapi_starter_webmvc_ui : "org.springdoc:springdoc-openapi-starter-webmvc-ui:$springdocOpenapiVersion",
Expand All @@ -35,6 +36,7 @@ ext {
postgresql : "org.postgresql:postgresql:$postgresqlVersion",
commons_lang3 : "org.apache.commons:commons-lang3:$commonsLangVersion",
servlet_api : "jakarta.servlet:jakarta.servlet-api:$servletApiVersion",
mybatis_generator_core: "org.mybatis.generator:mybatis-generator-core:$mybatisGeneratorVersion",

lombok : "org.projectlombok:lombok",
slf4j : "org.slf4j:slf4j-simple"
Expand Down
4 changes: 3 additions & 1 deletion samples/web-csr/dressca-backend/infrastructure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
testImplementation supportDependencies.spring_boot_starter_test
testImplementation supportDependencies.mybatis_spring_boot_starter_test

mybatisTasks 'org.mybatis.generator:mybatis-generator-core:1.4.2'
mybatisTasks supportDependencies.mybatis_generator_core
mybatisTasks supportDependencies.h2database
}

Expand All @@ -55,11 +55,13 @@ jar.enabled = true

tasks.register('runMyBatisGenerator') {
doLast {
// MyBatis Generator のタスクを定義します。
ant.taskdef(
name: 'mybatisGenerator',
classname: 'org.mybatis.generator.ant.GeneratorAntTask',
classpath: configurations.mybatisTasks.asPath
)
// MyBatis Generator による自動生成を実行します。
ant.mybatisGenerator(
overwrite: true,
configfile: file('src/main/resources/mybatisGeneratorConfig.xml'),
Expand Down

0 comments on commit dafa738

Please sign in to comment.