Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jersey for default spring library #82

Merged
merged 16 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build/
!**/src/test/**/build/
*.jks
target/
.env

### STS ###
.apt_generated
Expand Down
19 changes: 9 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.5'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
id 'checkstyle'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'org.sonarqube' version '5.1.0.4882'
id 'org.sonarqube' version '6.0.0.5145'
id 'com.adarshr.test-logger' version '4.0.0'
id 'jacoco'
id 'idea'
id "info.solidsoft.pitest" version "1.15.0"
id 'info.solidsoft.pitest' version '1.15.0'
}

idea {
Expand Down Expand Up @@ -38,19 +38,18 @@ repositories {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-jersey'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.session:spring-session-jdbc:3.3.3'
implementation 'org.flywaydb:flyway-core:10.20.1'
implementation "org.flywaydb:flyway-database-postgresql:10.20.1"
implementation 'org.springframework.session:spring-session-jdbc:3.4.0'
implementation 'org.flywaydb:flyway-core:11.0.0'
implementation 'org.flywaydb:flyway-database-postgresql:11.0.0'
implementation 'commons-lang:commons-lang:2.6'
implementation 'commons-beanutils:commons-beanutils:1.9.4'
implementation 'com.github.erosb:json-sKema:0.18.0'
implementation 'com.github.erosb:json-sKema:0.19.0'
implementation 'com.hubspot.jinjava:jinjava:2.7.3'
implementation 'io.github.zorin95670:spring-query-filter:1.1.3'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql:42.7.4'
annotationProcessor 'org.projectlombok:lombok'
Expand All @@ -67,7 +66,7 @@ tasks.named('test') {
}

checkstyle {
toolVersion = '10.12.5'
toolVersion = '10.20.1'
configFile = file("${project.rootDir}/checkstyle.xml")
sourceSets = [sourceSets.main]
}
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `GET /api/ai/secrets/[SECRET_ID]`, to get an AI secret.
* `PUT /api/ai/secrets/[SECRET_ID]`, to update an AI secret.
* `DELETE /api/ai/secrets/[SECRET_ID]`, to delete an AI secret.
* Use library to filter database from query parameters.

### Removed

- Jersey by Spring.

## [1.0.0] - 2024/10/15

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* All constants value.
*/
public final class Constants {
/**
* Minimum resource size.
*/
public static final int MINIMUM_RESOURCE_SIZE = 1;
/**
* Maximum resource size.
*/
Expand Down
61 changes: 0 additions & 61 deletions src/main/java/com/ditrit/letomodelizerapi/config/JerseyConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package com.ditrit.letomodelizerapi.config;

import com.ditrit.letomodelizerapi.controller.handler.AuthenticationSuccessHandler;
import com.ditrit.letomodelizerapi.persistence.repository.UserCsrfTokenRepository;
import com.ditrit.letomodelizerapi.persistence.repository.DatabaseCsrfTokenRepository;
import com.ditrit.letomodelizerapi.persistence.repository.UserCsrfTokenRepository;
import com.ditrit.letomodelizerapi.service.OAuth2UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
import org.springframework.security.oauth2.client.userinfo.OAuth2UserService;
import org.springframework.security.oauth2.core.user.OAuth2User;
import org.springframework.security.web.SecurityFilterChain;

/**
Expand All @@ -26,7 +24,7 @@ public class SecurityConfig {
/**
* Service to authenticate user.
*/
private final OAuth2UserService<OAuth2UserRequest, OAuth2User> oAuth2UserService;
private final OAuth2UserService oAuth2UserService;

/**
* Repository for CRUD operations on UserCsrfToken entities.
Expand All @@ -51,7 +49,7 @@ public class SecurityConfig {
* indicating how long (in seconds) the tokens are considered valid.
*/
@Autowired
public SecurityConfig(final OAuth2UserService<OAuth2UserRequest, OAuth2User> oAuth2UserService,
public SecurityConfig(final OAuth2UserService oAuth2UserService,
final UserCsrfTokenRepository userCsrfTokenRepository,
@Value("${csrf.token.timeout}") final long csrfTokenTimeout) {
this.oAuth2UserService = oAuth2UserService;
Expand Down
Loading
Loading