Skip to content

Commit da5effb

Browse files
committed
FIX: INCOPATIBILITY WITH SPRING 6
1 parent e3b6f87 commit da5effb

6 files changed

Lines changed: 36 additions & 22 deletions

File tree

pom.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>io.github.isa-group</groupId>
99
<artifactId>Pricing4Java</artifactId>
10-
<version>3.1.0</version>
10+
<version>3.2.0</version>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>
1313
<description>A pricing driven feature toggling library for java</description>
@@ -51,8 +51,8 @@
5151
<properties>
5252
<jackson.version>2.14.2</jackson.version>
5353
<aspectj.version>1.9.7</aspectj.version>
54-
<spring.version>5.3.24</spring.version>
55-
<spring.boot.version>2.7.6</spring.boot.version>
54+
<spring.version>6.1.5</spring.version>
55+
<spring.boot.version>3.2.0</spring.boot.version>
5656
<maven.compiler.source>11</maven.compiler.source>
5757
<maven.compiler.target>11</maven.compiler.target>
5858
</properties>
@@ -137,7 +137,7 @@
137137
<dependency>
138138
<groupId>org.junit.jupiter</groupId>
139139
<artifactId>junit-jupiter-api</artifactId>
140-
<version>5.9.3</version>
140+
<version>5.10.2</version>
141141
<scope>test</scope>
142142
</dependency>
143143

@@ -159,6 +159,20 @@
159159
<artifactId>snakeyaml</artifactId>
160160
<version>1.33</version>
161161
</dependency>
162+
163+
<!-- API, java.xml.bind module -->
164+
<dependency>
165+
<groupId>jakarta.xml.bind</groupId>
166+
<artifactId>jakarta.xml.bind-api</artifactId>
167+
<version>2.3.2</version>
168+
</dependency>
169+
170+
<!-- Runtime, com.sun.xml.bind module -->
171+
<dependency>
172+
<groupId>org.glassfish.jaxb</groupId>
173+
<artifactId>jaxb-runtime</artifactId>
174+
<version>2.3.2</version>
175+
</dependency>
162176
</dependencies>
163177

164178
<build>

src/main/java/io/github/isagroup/PricingEvaluatorUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import io.github.isagroup.models.FeatureStatus;
1616
import io.github.isagroup.models.PlanContextManager;
1717
import io.github.isagroup.models.PricingManager;
18-
import io.github.isagroup.services.jwt.JwtUtils;
18+
import io.github.isagroup.services.jwt.PricingJwtUtils;
1919
import io.jsonwebtoken.Jwts;
2020
import io.jsonwebtoken.SignatureAlgorithm;
2121

@@ -27,14 +27,14 @@
2727
public class PricingEvaluatorUtil {
2828

2929
@Autowired
30-
private JwtUtils jwtUtils;
30+
private PricingJwtUtils jwtUtils;
3131

3232
@Autowired
3333
private PricingContext pricingContext;
3434

3535
public PricingEvaluatorUtil(PricingContext pricingContext) {
3636
this.pricingContext = pricingContext;
37-
this.jwtUtils = new JwtUtils(pricingContext);
37+
this.jwtUtils = new PricingJwtUtils(pricingContext);
3838
}
3939

4040
Logger logger = Logger.getLogger(PricingEvaluatorUtil.class.getName());

src/main/java/io/github/isagroup/filters/RenewTokenFilter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import java.io.IOException;
44

5-
import javax.servlet.FilterChain;
6-
import javax.servlet.ServletException;
7-
import javax.servlet.http.HttpServletRequest;
8-
import javax.servlet.http.HttpServletResponse;
5+
import jakarta.servlet.FilterChain;
6+
import jakarta.servlet.ServletException;
7+
import jakarta.servlet.http.HttpServletRequest;
8+
import jakarta.servlet.http.HttpServletResponse;
99

1010
import org.springframework.beans.factory.annotation.Autowired;
1111
import org.springframework.util.StringUtils;
@@ -14,12 +14,12 @@
1414

1515
import io.github.isagroup.PricingContext;
1616
import io.github.isagroup.PricingEvaluatorUtil;
17-
import io.github.isagroup.services.jwt.JwtUtils;
17+
import io.github.isagroup.services.jwt.PricingJwtUtils;
1818

1919
public class RenewTokenFilter extends OncePerRequestFilter {
2020

2121
@Autowired
22-
private JwtUtils jwtUtils;
22+
private PricingJwtUtils jwtUtils;
2323

2424
@Value("${petclinic.app.jwtSecret}")
2525
private String jwtSecret;

src/main/java/io/github/isagroup/services/jwt/JwtUtils.java renamed to src/main/java/io/github/isagroup/services/jwt/PricingJwtUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
* Utility class that provides methods to generate and manage JWT.
2323
*/
2424
@Component
25-
public class JwtUtils {
25+
public class PricingJwtUtils {
2626

2727
@Autowired
2828
private PricingContext pricingContext;
2929

30-
public JwtUtils(PricingContext pricingContext) {
30+
public PricingJwtUtils(PricingContext pricingContext) {
3131
this.pricingContext = pricingContext;
3232
}
3333

34-
private static final Logger logger = LoggerFactory.getLogger(JwtUtils.class);
34+
private static final Logger logger = LoggerFactory.getLogger(PricingJwtUtils.class);
3535

3636
/**
3737
* Extracts the subject from the given JWT.

src/test/java/io/github/isagroup/PricingEvaluatorUtilTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.junit.jupiter.api.BeforeEach;
1111
import org.junit.jupiter.api.Test;
1212

13-
import io.github.isagroup.services.jwt.JwtUtils;
13+
import io.github.isagroup.services.jwt.PricingJwtUtils;
1414

1515
public class PricingEvaluatorUtilTests {
1616

@@ -26,7 +26,7 @@ public class PricingEvaluatorUtilTests {
2626

2727
private PricingEvaluatorUtil pricingEvaluatorUtil;
2828

29-
private JwtUtils jwtUtils;
29+
private PricingJwtUtils jwtUtils;
3030

3131
@BeforeEach
3232
public void setUp() {
@@ -51,7 +51,7 @@ public void setUp() {
5151

5252
this.pricingContext = pricingContext;
5353
this.pricingEvaluatorUtil = new PricingEvaluatorUtil(pricingContext);
54-
this.jwtUtils = new JwtUtils(pricingContext);
54+
this.jwtUtils = new PricingJwtUtils(pricingContext);
5555
}
5656

5757
@Test

src/test/java/io/github/isagroup/PricingPlanAwareTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
import io.github.isagroup.annotations.PricingPlanAwareAspect;
2525
import io.github.isagroup.exceptions.FilepathException;
2626
import io.github.isagroup.exceptions.PricingPlanEvaluationException;
27-
import io.github.isagroup.services.jwt.JwtUtils;
27+
import io.github.isagroup.services.jwt.PricingJwtUtils;
2828

2929
@ExtendWith(SpringExtension.class)
3030
@SpringBootTest
3131
@Import({ io.github.isagroup.annotations.PricingPlanAwareAspect.class, io.github.isagroup.PricingEvaluatorUtil.class,
32-
io.github.isagroup.services.jwt.JwtUtils.class })
32+
io.github.isagroup.services.jwt.PricingJwtUtils.class })
3333
public class PricingPlanAwareTests {
3434

3535
private static final String JWT_SECRET_TEST = "secret";
@@ -122,7 +122,7 @@ public Object getUserAuthorities() {
122122
private PricingEvaluatorUtil pricingEvaluatorUtil;
123123

124124
@Autowired
125-
private JwtUtils jwtUtils;
125+
private PricingJwtUtils jwtUtils;
126126

127127
@Mock
128128
private ProceedingJoinPoint joinPoint;

0 commit comments

Comments
 (0)