plugins {
id 'java'
id 'org.springframework.boot' version '4.0.6'}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'}
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.6'
id 'io.spring.dependency-management' version '1.1.7'
id 'checkstyle'
id 'com.diffplug.spotless' version '6.25.0'}
checkstyle {
toolVersion ='10.12.0'}
spotless {
java {eclipse()
target 'src/**/*.java'}}
group ='com.example'
version ='0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(26)}}
repositories {mavenCentral()}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
testImplementation 'org.testcontainers:testcontainers-mysql'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'}
tasks.named('test'){useJUnitPlatform()}
追記しているのは以下の部分だけです
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.6'
id 'io.spring.dependency-management' version '1.1.7'
id 'checkstyle'
id 'com.diffplug.spotless' version '6.25.0'}
checkstyle {
toolVersion ='10.12.0'}
spotless {
java {eclipse()
target 'src/**/*.java'}}
config/checkstyle/checkstyle.xml
<?xml version="1.0"?><!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd"><modulename="Checker"><modulename="TreeWalker"><modulename="UnusedImports"/></module></module>