12a28af1ca
- Champ `name` ajouté sur User, UserEntity, RegisterRequest - AuthenticateUserUseCase retourne Result(user, token) au lieu du token seul - UserNotFoundException remplacé par BadCredentialsException au login (pas de fuite d'info) - @Email retiré de LoginRequest (identifiant = "gato", pas nécessairement un email) - Migration V2 : colonne name + utilisateur par défaut gato/change (ADMIN) - bytecode cible Java 21 (ASM Spring Boot 3.4 ne supporte pas Java 25) - Tests : AbstractIntegrationTest simplifié, URL TC JDBC + network host Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
76 lines
2.1 KiB
Groovy
76 lines
2.1 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.4.1'
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
|
}
|
|
|
|
group = 'com.olhar'
|
|
version = '0.0.1'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
}
|
|
|
|
// Spring Boot 3.4.x embarque ASM 9.7 qui supporte jusqu'au bytecode Java 23 (version 67).
|
|
// On compile avec le JDK 25 mais on cible Java 21 pour rester compatible avec le scanner Spring.
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.release = 21
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
ext {
|
|
testcontainersVersion = '1.20.4'
|
|
}
|
|
|
|
dependencies {
|
|
// Spring Boot starters
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
|
|
// Database
|
|
runtimeOnly 'org.postgresql:postgresql'
|
|
implementation 'org.flywaydb:flyway-core'
|
|
implementation 'org.flywaydb:flyway-database-postgresql'
|
|
|
|
// OpenAPI / Swagger
|
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'
|
|
|
|
// JWT
|
|
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
|
|
|
|
// Utils
|
|
compileOnly 'org.projectlombok:lombok:1.18.38'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.38'
|
|
|
|
// Test
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.security:spring-security-test'
|
|
testImplementation 'org.testcontainers:junit-jupiter'
|
|
testImplementation 'org.testcontainers:postgresql'
|
|
testCompileOnly 'org.projectlombok:lombok:1.18.38'
|
|
testAnnotationProcessor 'org.projectlombok:lombok:1.18.38'
|
|
}
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "org.testcontainers:testcontainers-bom:${testcontainersVersion}"
|
|
}
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks.named('bootJar') {
|
|
archiveFileName = 'olhar-api.jar'
|
|
}
|