Skip to content

Commit

Permalink
remove deprecated class and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Opoku committed Oct 18, 2024
1 parent 1321949 commit 2a9c31f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 35 deletions.
23 changes: 12 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'org.springframework.boot' version '3.3.4'
id 'io.spring.dependency-management' version '1.1.5'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.owasp.dependencycheck' version '10.0.0'
id 'com.diffplug.spotless' version '6.25.0'
id 'eclipse'
Expand Down Expand Up @@ -36,10 +36,10 @@ repositories {
}

ext {
set('jjwtVersion', '0.12.5')
set('jjwtVersion', '0.12.6')
set('springDocVersion', '2.6.0')
set('javadocScribeVersion', '0.15.0')
set('mapstructVersion', '1.5.5.Final')
set('mapstructVersion', '1.6.2')
}

dependencies {
Expand Down Expand Up @@ -67,8 +67,8 @@ dependencies {
implementation "io.jsonwebtoken:jjwt-api:${jjwtVersion}"
runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwtVersion}"
runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwtVersion}"
implementation 'commons-io:commons-io:2.16.1'
implementation 'net.datafaker:datafaker:2.3.1'
implementation 'commons-io:commons-io:2.17.0'
implementation 'net.datafaker:datafaker:2.4.0'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'commons-validator:commons-validator:1.9.0'
implementation 'com.github.darrachequesne:spring-data-jpa-datatables:6.0.4'
Expand All @@ -84,7 +84,7 @@ dependencies {
runtimeOnly 'org.postgresql:postgresql'
implementation 'org.liquibase:liquibase-core'
implementation 'org.hibernate.orm:hibernate-envers'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.686'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.765'
implementation files('libs/hypersistence-optimizer-2.6.3-jakarta.jar')

// MapStruct for Object Mapping
Expand All @@ -95,9 +95,9 @@ dependencies {
implementation 'org.webjars:jquery:3.7.1'
implementation 'org.webjars:bootstrap:5.3.3'
implementation 'org.webjars:popper.js:2.11.7'
implementation 'org.webjars:jquery-ui:1.13.2'
implementation 'org.webjars:jquery-ui:1.14.0'
implementation 'org.webjars:datatables:1.13.5'
implementation 'org.webjars:font-awesome:6.5.1'
implementation 'org.webjars:font-awesome:6.5.2'
implementation 'org.webjars:webjars-locator:0.52'
}

Expand All @@ -110,11 +110,11 @@ testing {
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.mockito:mockito-inline:5.2.0'
implementation 'org.mockito:mockito-core:5.14.2'
implementation 'io.findify:s3mock_2.13:0.2.6'
implementation 'com.icegreen:greenmail-junit5:2.0.1'
implementation 'com.icegreen:greenmail-junit5:2.1.0'
implementation 'com.jparams:to-string-verifier:1.4.8'
implementation 'nl.jqno.equalsverifier:equalsverifier:3.17'
implementation 'nl.jqno.equalsverifier:equalsverifier:3.17.1'
implementation 'org.springframework.security:spring-security-test'
implementation 'org.springframework.boot:spring-boot-starter-test'
}
Expand All @@ -128,6 +128,7 @@ testing {
implementation sourceSets.test.output

implementation 'org.springframework.boot:spring-boot-testcontainers'
implementation 'com.amazonaws:aws-java-sdk-core:1.12.765'
implementation 'org.testcontainers:junit-jupiter'
implementation 'org.testcontainers:postgresql'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.PrePersist;
import jakarta.persistence.SequenceGenerator;
import jakarta.persistence.Version;
import jakarta.validation.constraints.NotBlank;
import java.io.Serializable;
Expand All @@ -16,8 +17,6 @@
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
Expand All @@ -39,22 +38,13 @@
public class BaseEntity<T extends Serializable> {

private static final String SEQUENCE_NAME = "SpringBootStarterSequence";
private static final String SEQUENCE_INITIAL_VALUE = "1";
private static final String SEQUENCE_GENERATOR_NAME = "SpringBootStarterSequenceGenerator";

/**
* Sequence Style Generator to auto generate ID based on the choices in the parameters.
*
* @see AssignedSequenceStyleGenerator
*/
@GenericGenerator(
/** Sequence Generator to auto generate IDs. */
@SequenceGenerator(
name = SEQUENCE_GENERATOR_NAME,
type = AssignedSequenceStyleGenerator.class,
parameters = {
@Parameter(name = "sequence_name", value = SEQUENCE_NAME),
@Parameter(name = "initial_value", value = SEQUENCE_INITIAL_VALUE),
@Parameter(name = "increment_size", value = SEQUENCE_INITIAL_VALUE)
})
sequenceName = SEQUENCE_NAME,
allocationSize = 1)
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE_GENERATOR_NAME)
private T id;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/developersboard/config/core/DevConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.developersboard.config.properties.AwsProperties;
Expand Down Expand Up @@ -33,11 +32,11 @@ public class DevConfig {
*/
@Bean
public AmazonS3 amazonS3(AwsProperties props) {
// Create the credentials provider
// Create the credential provider
var credentials = new BasicAWSCredentials(props.getAccessKeyId(), props.getSecretAccessKey());

return AmazonS3ClientBuilder.standard()
.withRegion(Regions.fromName(props.getRegion()))
.withRegion(props.getRegion())
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.developersboard.backend.service.mail.EmailService;
Expand Down Expand Up @@ -35,11 +34,11 @@ public class DockerConfig {
*/
@Bean
public AmazonS3 amazonS3(AwsProperties props) {
// Create the credentials provider
// Create the credential provider
var credentials = new BasicAWSCredentials(props.getAccessKeyId(), props.getSecretAccessKey());

return AmazonS3ClientBuilder.standard()
.withRegion(Regions.fromName(props.getRegion()))
.withRegion(props.getRegion())
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.developersboard.config.properties.AwsProperties;
Expand Down Expand Up @@ -35,7 +34,7 @@ public AmazonS3 amazonS3(AwsProperties props) {
var credentials = new BasicAWSCredentials(props.getAccessKeyId(), props.getSecretAccessKey());

return AmazonS3ClientBuilder.standard()
.withRegion(Regions.fromName(props.getRegion()))
.withRegion(props.getRegion())
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.build();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spring.jpa.properties.hibernate.query.fail_on_pagination_over_collection_fetch=t
spring.jpa.properties.org.hibernate.envers.audit_strategy=org.hibernate.envers.strategy.internal.ValidityAuditStrategy
spring.jpa.properties.org.hibernate.envers.audit_table_suffix=_AUDIT_LOG
server.error.include-stacktrace=ON_PARAM
server.max-http-header-size=40KB
server.max-http-request-header-size=40KB
# ===============================
# = JACKSON
# ===============================
Expand Down

0 comments on commit 2a9c31f

Please sign in to comment.