Skip to content

Commit b859baa

Browse files
authored
add switch (vmware#2847)
1 parent 63a6e5c commit b859baa

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

g11n-ws/modules/md-restful-api-i18n/src/main/java/com/vmware/vip/i18n/api/v1/translation/TranslationSyncAPI.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import io.swagger.v3.oas.annotations.Operation;
88
import jakarta.servlet.http.HttpServletRequest;
99

10+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
1011
import org.springframework.http.HttpStatus;
1112
import org.springframework.web.bind.annotation.PathVariable;
1213
import org.springframework.web.bind.annotation.RequestBody;
@@ -29,6 +30,7 @@
2930
*
3031
*/
3132
@RestController
33+
@ConditionalOnProperty(name = "translation.update.enable", havingValue = "true", matchIfMissing = true)
3234
public class TranslationSyncAPI extends TranslationSyncAction {
3335

3436
/**

g11n-ws/modules/md-restful-api-i18n/src/main/java/com/vmware/vip/i18n/api/v2/translation/TranslationSyncAPI.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import io.swagger.v3.oas.annotations.Operation;
88
import jakarta.servlet.http.HttpServletRequest;
99

10+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
1011
import org.springframework.http.HttpStatus;
1112
import org.springframework.web.bind.annotation.PathVariable;
1213
import org.springframework.web.bind.annotation.RequestBody;
@@ -30,6 +31,7 @@
3031
*
3132
*/
3233
@RestController("v2-TranslationSyncAPI")
34+
@ConditionalOnProperty(name = "translation.update.enable", havingValue = "true", matchIfMissing = true)
3335
public class TranslationSyncAPI extends TranslationSyncAction {
3436

3537
/**

g11n-ws/vip-manager-lite-i18n/src/main/resources/application-bundle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ server.trace.enable=false
2828
server.shutdown=graceful
2929
spring.lifecycle.timeout-per-shutdown-phase=30s
3030

31+
#translation update switch
32+
translation.update.enable=false
33+
3134
#collection source server
3235
source.cache.flag = false
3336
source.cache.server.url = https://localhost:8088

g11n-ws/vip-manager-lite-i18n/src/main/resources/application-s3.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ server.trace.enable=false
2727
#graceful shutdown
2828
server.shutdown=graceful
2929
spring.lifecycle.timeout-per-shutdown-phase=30s
30+
31+
#translation update switch
32+
translation.update.enable=false
33+
3034
#collection source server
3135
source.cache.flag = false
3236
source.cache.server.url = https://localhost:8088

0 commit comments

Comments
 (0)