forked from finos/symphony-bdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated SpringBoot to 3.2.2 to fix CVE-2024-22233 - Fix springboot autoconfiguration config bug in app starter
- Loading branch information
1 parent
b564165
commit 21e93c4
Showing
17 changed files
with
155 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ot-starter/src/main/java/com/symphony/bdk/app/spring/config/BdkHealthIndicatorConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.symphony.bdk.app.spring.config; | ||
|
||
import com.symphony.bdk.app.spring.service.SymphonyBdkHealthIndicator; | ||
import com.symphony.bdk.app.spring.service.SymphonyBdkHealthIndicator.CustomStatusCodeMapper; | ||
import com.symphony.bdk.core.service.health.HealthService; | ||
|
||
import org.springframework.boot.actuate.health.HttpCodeStatusMapper; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
|
||
@ConditionalOnProperty("bdk.bot.username") | ||
public class BdkHealthIndicatorConfig { | ||
|
||
@Bean(name = "bot") | ||
@ConditionalOnMissingBean | ||
public SymphonyBdkHealthIndicator symphonyBdkHealthIndicator(HealthService healthService) { | ||
return new SymphonyBdkHealthIndicator(healthService); | ||
} | ||
|
||
@Bean | ||
@ConditionalOnBean(name = "bot") | ||
public HttpCodeStatusMapper customStatusCodeMapper() { | ||
return new CustomStatusCodeMapper(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...-spring/symphony-bdk-app-spring-boot-starter/src/main/resources/META-INF/spring.factories
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.symphony.bdk.app.spring.SymphonyBdkAppAutoConfiguration |
15 changes: 3 additions & 12 deletions
15
...arter/src/test/java/com/symphony/bdk/app/spring/config/BdkExtAppControllerConfigTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...tarter/src/test/java/com/symphony/bdk/app/spring/config/BdkHealthIndicatorConfigTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.symphony.bdk.app.spring.config; | ||
|
||
import com.symphony.bdk.core.service.health.HealthService; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
import static org.mockito.Mockito.mock; | ||
|
||
class BdkHealthIndicatorConfigTest { | ||
|
||
@Test | ||
void createSymphonyBdkHealthIndicatorTest() { | ||
final BdkHealthIndicatorConfig config = new BdkHealthIndicatorConfig(); | ||
final HealthService healthService = mock(HealthService.class); | ||
|
||
assertNotNull(config.symphonyBdkHealthIndicator(healthService)); | ||
|
||
assertNotNull(config.customStatusCodeMapper()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.