Skip to content

Commit

Permalink
fix adservice-v2 start fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Frapschen committed Apr 11, 2023
1 parent 73da808 commit 653599e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.daocloud.springcloud.adservice;

import com.alibaba.csp.sentinel.util.StringUtil;
import org.daocloud.springcloud.adservice.init.SentinelClusterClientInitFunc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand All @@ -25,7 +26,10 @@ public static void main(String[] args) {

@PostConstruct
public void initSentinelClusterFlow() throws Exception{
new SentinelClusterClientInitFunc().init();
String sentinel = System.getProperty("spring.cloud.sentinel.enabled");
if("true".equals(sentinel)){
new SentinelClusterClientInitFunc().init();
}
}
}

0 comments on commit 653599e

Please sign in to comment.