Skip to content

Commit c5cb730

Browse files
committed
feat(cosid): add proxy support and update configuration
- Add proxy host and load-balanced configuration to application.yaml - Introduce NestedConfigurationProperty for proxy properties in CosIdProperties class
1 parent 1933c25 commit c5cb730

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cosid-spring-boot-starter/src/main/java/me/ahoo/cosid/spring/boot/starter/CosIdProperties.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import me.ahoo.cosid.CosId;
1717

1818
import org.springframework.boot.context.properties.ConfigurationProperties;
19+
import org.springframework.boot.context.properties.NestedConfigurationProperty;
1920

2021
/**
2122
* CosId Properties.
@@ -28,7 +29,8 @@ public class CosIdProperties {
2829
private boolean enabled = true;
2930

3031
private String namespace = DEFAULT_NAMESPACE;
31-
32+
33+
@NestedConfigurationProperty
3234
private ProxyProperties proxy = new ProxyProperties();
3335

3436
public boolean isEnabled() {

examples/cosid-example-proxy/src/main/resources/application.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ cosid:
1313
enabled: true
1414
snowflake:
1515
enabled: true
16+
proxy:
17+
host: http://localhost:8688
18+
load-balanced: true
1619

1720
# segment:
1821
# enabled: true

0 commit comments

Comments
 (0)