Skip to content

Commit 50f78d9

Browse files
gblaihBryan Lai
and
Bryan Lai
authored
Upgrade to spring boot 3.4 (#11318)
* upgrade to spring boot 3.4 * fix critical and high vulnerabilities * fix vulnerability with commons-io * fix mysql connector vulnerability * fix security integration tests * add back test scopes * remove conflicting dependencies --------- Co-authored-by: Bryan Lai <[email protected]>
1 parent 3e67e8a commit 50f78d9

File tree

8 files changed

+466
-53
lines changed

8 files changed

+466
-53
lines changed

pom.xml

+16-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.springframework.boot</groupId>
99
<artifactId>spring-boot-starter-parent</artifactId>
10-
<version>3.1.4</version>
10+
<version>3.4.1</version>
1111
</parent>
1212

1313
<groupId>org.cbioportal</groupId>
@@ -38,6 +38,7 @@
3838

3939
<jackson.version>2.12.5</jackson.version>
4040
<mysql-connector.version>8.0.28</mysql-connector.version>
41+
<mysql.version>8.2.0</mysql.version>
4142
<springfox.version>3.0.0</springfox.version>
4243
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4344
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -72,14 +73,14 @@
7273

7374
<!-- Unknown -->
7475
<io.swagger.version>1.6.3</io.swagger.version>
75-
<mybatis.starter.version>3.0.2</mybatis.starter.version>
76+
<mybatis.starter.version>3.0.4</mybatis.starter.version>
7677
<testcontainers.version>1.19.4</testcontainers.version>
7778
<mockserver.version>5.15.0</mockserver.version>
7879
<opensaml.version>4.1.1</opensaml.version>
7980

8081

8182
<!-- Third Party -->
82-
<redisson.version>3.13.2</redisson.version>
83+
<redisson.version>3.22.0</redisson.version>
8384
<commons-math3.version>3.6.1</commons-math3.version>
8485
<springdoc.version>2.2.0</springdoc.version>
8586
<apache-commons-collections.version>4.4</apache-commons-collections.version>
@@ -93,13 +94,12 @@
9394
<json_simple.version>1.1.1</json_simple.version>
9495
<mongo_java_driver.version>3.12.14</mongo_java_driver.version>
9596
<datumbox.version>0.8.2</datumbox.version>
96-
<mysql_driver.version>8.0.33</mysql_driver.version>
9797
<dasniko-testcontainer-keycloak.version>3.2.0</dasniko-testcontainer-keycloak.version>
9898
<selenium_chrome_driver.version>3.14.0</selenium_chrome_driver.version>
9999
<selenium.version>4.17.0</selenium.version>
100100
<sentry.version>7.1.0</sentry.version>
101-
<apache_httpclient.version>5.2.1</apache_httpclient.version>
102101
<clickhouse_testcontainer.version>1.19.7</clickhouse_testcontainer.version>
102+
<bouncy_castle.version>1.78</bouncy_castle.version>
103103

104104

105105
<!-- No sure what these are for -->
@@ -211,6 +211,12 @@
211211
<groupId>com.github.romain-warnan</groupId>
212212
<artifactId>simple-java-bitly</artifactId>
213213
<version>${simple_java_bitly.version}</version>
214+
<exclusions>
215+
<exclusion>
216+
<groupId>org.apache.httpcomponents</groupId>
217+
<artifactId>httpclient</artifactId>
218+
</exclusion>
219+
</exclusions>
214220
</dependency>
215221
<dependency>
216222
<groupId>org.ehcache</groupId>
@@ -249,11 +255,11 @@
249255
<artifactId>jwks-rsa</artifactId>
250256
<version>0.22.1</version>
251257
</dependency>
252-
<dependency>
253-
<groupId>mysql</groupId>
254-
<artifactId>mysql-connector-java</artifactId>
255-
<version>${mysql_driver.version}</version>
256-
</dependency>
258+
<dependency>
259+
<groupId>com.mysql</groupId>
260+
<artifactId>mysql-connector-j</artifactId>
261+
<version>${mysql.version}</version>
262+
</dependency>
257263
<dependency>
258264
<groupId>org.springframework.boot</groupId>
259265
<artifactId>spring-boot-starter-thymeleaf</artifactId>
@@ -351,7 +357,6 @@
351357
<dependency>
352358
<groupId>org.apache.httpcomponents.client5</groupId>
353359
<artifactId>httpclient5</artifactId>
354-
<version>${apache_httpclient.version}</version>
355360
<scope>test</scope>
356361
</dependency>
357362

src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@
228228
clinical_event.EVENT_TYPE = #{element.eventType}
229229
</if>
230230
<if test="element.attributes != null and !element.attributes.isEmpty()">
231-
(clinical_event.EVENT_TYPE, clinical_event_data.KEY, clinical_event_data.VALUE) IN
231+
(CONCAT(clinical_event.EVENT_TYPE, '_', clinical_event_data.KEY, '_', clinical_event_data.VALUE)) IN
232232
<foreach item="attribute" collection="element.attributes" open="(" separator="," close=")">
233-
(#{element.eventType}, #{attribute.key}, #{attribute.value})
233+
CONCAT(#{element.eventType}, '_', #{attribute.key}, '_', #{attribute.value})
234234
</foreach>
235235
</if>
236236
</foreach>
@@ -291,9 +291,9 @@
291291
clinical_event.EVENT_TYPE = #{element.eventType}
292292
</if>
293293
<if test="element.attributes != null and !element.attributes.isEmpty()">
294-
(clinical_event.EVENT_TYPE, clinical_event_data.KEY) IN
294+
(CONCAT(clinical_event.EVENT_TYPE, '_', clinical_event_data.KEY)) IN
295295
<foreach item="attribute" collection="element.attributes" open="(" separator="," close=")">
296-
(#{element.eventType}, #{attribute.key})
296+
CONCAT(#{element.eventType}, '_', #{attribute.key})
297297
</foreach>
298298
</if>
299299
</foreach>

src/test/java/org/cbioportal/persistence/mybatis/CopyNumberSegmentMyBatisRepositoryTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,16 @@ public void fetchCopyNumberSegments() throws Exception {
181181
studyIds, sampleIds, "3", "SUMMARY");
182182

183183
Assert.assertEquals(3, result0.size());
184-
Assert.assertEquals("TCGA-A1-B0SO-01", result0.get(0).getSampleStableId());
184+
Assert.assertEquals("TCGA-A1-A0SB-01", result0.get(0).getSampleStableId());
185185
Assert.assertEquals("TCGA-A1-A0SB-01", result0.get(1).getSampleStableId());
186-
Assert.assertEquals("TCGA-A1-A0SB-01", result0.get(2).getSampleStableId());
186+
Assert.assertEquals("TCGA-A1-B0SO-01", result0.get(2).getSampleStableId());
187187

188188
Assert.assertEquals(1, result1.size());
189189
Assert.assertEquals("TCGA-A1-A0SB-01", result1.get(0).getSampleStableId());
190190

191191
Assert.assertEquals(2, result2.size());
192-
Assert.assertEquals("TCGA-A1-B0SO-01", result2.get(0).getSampleStableId());
193-
Assert.assertEquals("TCGA-A1-A0SB-01", result2.get(1).getSampleStableId());
192+
Assert.assertEquals("TCGA-A1-A0SB-01", result2.get(0).getSampleStableId());
193+
Assert.assertEquals("TCGA-A1-B0SO-01", result2.get(1).getSampleStableId());
194194

195195
Assert.assertEquals(0, result3.size());
196196
}

src/test/java/org/cbioportal/persistence/util/fakeclient/MockInMemoryRedissonClient.java

+78-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.redisson.api.redisnode.BaseRedisNodes;
55
import org.redisson.api.redisnode.RedisNodes;
66
import org.redisson.client.codec.Codec;
7+
import org.redisson.codec.JsonCodec;
78
import org.redisson.config.Config;
89

910
import java.util.concurrent.ConcurrentHashMap;
@@ -32,12 +33,12 @@ public RKeys getKeys() {
3233
}
3334

3435
@Override
35-
public <V> RTimeSeries<V> getTimeSeries(String s) {
36+
public <V, L> RTimeSeries<V, L> getTimeSeries(String s) {
3637
throw new UnsupportedOperationException();
3738
}
3839

3940
@Override
40-
public <V> RTimeSeries<V> getTimeSeries(String s, Codec codec) {
41+
public <V, L> RTimeSeries<V, L> getTimeSeries(String s, Codec codec) {
4142
throw new UnsupportedOperationException();
4243
}
4344

@@ -51,6 +52,16 @@ public <K, V> RStream<K, V> getStream(String s, Codec codec) {
5152
throw new UnsupportedOperationException();
5253
}
5354

55+
@Override
56+
public RSearch getSearch() {
57+
throw new UnsupportedOperationException();
58+
}
59+
60+
@Override
61+
public RSearch getSearch(Codec codec) {
62+
throw new UnsupportedOperationException();
63+
}
64+
5465
@Override
5566
public RRateLimiter getRateLimiter(String s) {
5667
throw new UnsupportedOperationException();
@@ -116,6 +127,11 @@ public RBuckets getBuckets(Codec codec) {
116127
throw new UnsupportedOperationException();
117128
}
118129

130+
@Override
131+
public <V> RJsonBucket<V> getJsonBucket(String name, JsonCodec<V> codec) {
132+
throw new UnsupportedOperationException();
133+
}
134+
119135
@Override
120136
public <V> RHyperLogLog<V> getHyperLogLog(String s) {
121137
throw new UnsupportedOperationException();
@@ -221,6 +237,21 @@ public RLock getLock(String s) {
221237
throw new UnsupportedOperationException();
222238
}
223239

240+
@Override
241+
public RLock getSpinLock(String s) {
242+
throw new UnsupportedOperationException();
243+
}
244+
245+
@Override
246+
public RLock getSpinLock(String s, LockOptions.BackOff backOff) {
247+
throw new UnsupportedOperationException();
248+
}
249+
250+
@Override
251+
public RFencedLock getFencedLock(String s) {
252+
throw new UnsupportedOperationException();
253+
}
254+
224255
@Override
225256
public RLock getMultiLock(RLock... rLocks) {
226257
throw new UnsupportedOperationException();
@@ -281,6 +312,16 @@ public RLexSortedSet getLexSortedSet(String s) {
281312
throw new UnsupportedOperationException();
282313
}
283314

315+
@Override
316+
public RShardedTopic getShardedTopic(String s) {
317+
throw new UnsupportedOperationException();
318+
}
319+
320+
@Override
321+
public RShardedTopic getShardedTopic(String s, Codec codec) {
322+
throw new UnsupportedOperationException();
323+
}
324+
284325
@Override
285326
public RTopic getTopic(String s) {
286327
throw new UnsupportedOperationException();
@@ -291,6 +332,16 @@ public RTopic getTopic(String s, Codec codec) {
291332
throw new UnsupportedOperationException();
292333
}
293334

335+
@Override
336+
public RReliableTopic getReliableTopic(String s) {
337+
throw new UnsupportedOperationException();
338+
}
339+
340+
@Override
341+
public RReliableTopic getReliableTopic(String s, Codec codec) {
342+
throw new UnsupportedOperationException();
343+
}
344+
294345
@Override
295346
public RPatternTopic getPatternTopic(String s) {
296347
throw new UnsupportedOperationException();
@@ -456,6 +507,21 @@ public <V> RBloomFilter<V> getBloomFilter(String s, Codec codec) {
456507
throw new UnsupportedOperationException();
457508
}
458509

510+
@Override
511+
public RIdGenerator getIdGenerator(String s) {
512+
throw new UnsupportedOperationException();
513+
}
514+
515+
@Override
516+
public RFunction getFunction() {
517+
throw new UnsupportedOperationException();
518+
}
519+
520+
@Override
521+
public RFunction getFunction(Codec codec) {
522+
throw new UnsupportedOperationException();
523+
}
524+
459525
@Override
460526
public RScript getScript() {
461527
throw new UnsupportedOperationException();
@@ -526,6 +592,16 @@ public RLiveObjectService getLiveObjectService() {
526592
throw new UnsupportedOperationException();
527593
}
528594

595+
@Override
596+
public RedissonRxClient rxJava() {
597+
throw new UnsupportedOperationException();
598+
}
599+
600+
@Override
601+
public RedissonReactiveClient reactive() {
602+
throw new UnsupportedOperationException();
603+
}
604+
529605
@Override
530606
public void shutdown() {
531607

0 commit comments

Comments
 (0)