-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wildeslam
committed
Jul 4, 2024
1 parent
3fba525
commit bfd2749
Showing
5 changed files
with
53 additions
and
16 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
40 changes: 40 additions & 0 deletions
40
arex-web-api/src/main/java/com/arextest/web/api/service/beans/SystemConfigBootstrap.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,40 @@ | ||
package com.arextest.web.api.service.beans; | ||
|
||
import com.arextest.config.model.dao.config.SystemConfigurationCollection.KeySummary; | ||
import com.arextest.config.model.dto.system.SystemConfiguration; | ||
import com.arextest.config.repository.SystemConfigurationRepository; | ||
import com.arextest.web.core.business.ConfigLoadService; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.InitializingBean; | ||
|
||
/** | ||
* @author wildeslam. | ||
* @create 2024/7/3 16:15 | ||
*/ | ||
@Data | ||
@Slf4j | ||
@AllArgsConstructor | ||
public class SystemConfigBootstrap implements InitializingBean { | ||
|
||
private ConfigLoadService configLoadService; | ||
private SystemConfigurationRepository systemConfigurationRepository; | ||
|
||
|
||
@Override | ||
public void afterPropertiesSet() { | ||
Set<String> ignoreNodeSet = configLoadService.getIgnoreNodeSet(""); | ||
if (ignoreNodeSet == null) { | ||
ignoreNodeSet = new HashSet<>(); | ||
} | ||
SystemConfiguration systemConfiguration = new SystemConfiguration(); | ||
systemConfiguration.setKey(KeySummary.IGNORE_NODE_SET); | ||
systemConfiguration.setIgnoreNodeSet(ignoreNodeSet); | ||
systemConfigurationRepository.saveConfig(systemConfiguration); | ||
} | ||
|
||
|
||
} |
13 changes: 0 additions & 13 deletions
13
.../src/main/java/com/arextest/web/api/service/beans/auto/SystemConfigAutoConfiguration.java
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
spring: | ||
profiles: | ||
active: prod | ||
active: dev | ||
application: | ||
name: Arex web service | ||
jackson: | ||
|
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