Commit 1242fe6a authored by 董建华's avatar 董建华

调整加载策略

parent 25c47290
......@@ -12,6 +12,7 @@ import io.sentry.SentryClientFactory;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -44,10 +45,7 @@ public class SentryDingdingConfiguration {
@Autowired
private SentryClient sentryClient;
@ConditionalOnProperty(
prefix = "threrr"
)
@ConditionalOnBean(ThrErrProProperties.class)
@Bean("thrErrSentryClient")
public SentryClient thrErrSentryClient() {
log.info("init sentry client... dsn:{}", this.properties.getDsn());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment