feature(all): 服务增加配置文件信息加密
This commit is contained in:
@@ -17,6 +17,7 @@ public class RuntimeInfo {
|
|||||||
private String zkUrl;
|
private String zkUrl;
|
||||||
private String eurekaUrl;
|
private String eurekaUrl;
|
||||||
private HudiInfo hudi;
|
private HudiInfo hudi;
|
||||||
|
private SecurityInfo security;
|
||||||
|
|
||||||
public String getUser() {
|
public String getUser() {
|
||||||
return user;
|
return user;
|
||||||
@@ -98,6 +99,14 @@ public class RuntimeInfo {
|
|||||||
this.hudi = hudi;
|
this.hudi = hudi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SecurityInfo getSecurity() {
|
||||||
|
return security;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurity(SecurityInfo security) {
|
||||||
|
this.security = security;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "RuntimeInfo{" +
|
return "RuntimeInfo{" +
|
||||||
@@ -111,6 +120,7 @@ public class RuntimeInfo {
|
|||||||
", zkUrl='" + zkUrl + '\'' +
|
", zkUrl='" + zkUrl + '\'' +
|
||||||
", eurekaUrl='" + eurekaUrl + '\'' +
|
", eurekaUrl='" + eurekaUrl + '\'' +
|
||||||
", hudi=" + hudi +
|
", hudi=" + hudi +
|
||||||
|
", security=" + security +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,4 +162,43 @@ public class RuntimeInfo {
|
|||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class SecurityInfo {
|
||||||
|
private String authority;
|
||||||
|
private String username;
|
||||||
|
private String darkcode;
|
||||||
|
|
||||||
|
public String getAuthority() {
|
||||||
|
return authority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthority(String authority) {
|
||||||
|
this.authority = authority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDarkcode() {
|
||||||
|
return darkcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDarkcode(String darkcode) {
|
||||||
|
this.darkcode = darkcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SecurityInfo{" +
|
||||||
|
"authority='" + authority + '\'' +
|
||||||
|
", username='" + username + '\'' +
|
||||||
|
", darkcode='" + darkcode + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,15 @@ deploy:
|
|||||||
loki-base-url: http://132.122.116.142:33100
|
loki-base-url: http://132.122.116.142:33100
|
||||||
loki-url: ${deploy.runtime.loki-base-url}/loki/api/v1/push
|
loki-url: ${deploy.runtime.loki-base-url}/loki/api/v1/push
|
||||||
zk-url: b5m1.hdp.dc:2181,b5m2.hdp.dc:2181,b5m3.hdp.dc:2181
|
zk-url: b5m1.hdp.dc:2181,b5m2.hdp.dc:2181,b5m3.hdp.dc:2181
|
||||||
eureka-url: http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.143:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.144:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.145:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.146:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.147:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.148:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.149:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.150:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.151:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.152:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.153:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.154:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.155:35670/eureka/,http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.156:35670/eureka
|
eureka-url: ENC(1gFdUy0/FYxDMK910ZS65qNqdULnnSOPrR8EkqrZ3zYXsTP9kk8y55C7WbcxM5vaa1KIDNEqilEIA2sOLX3920gu3Woq805pf8dzxl9/velQWdaTFUxn9XqypuP+p/bSyY3upCYehCZFWgPPSn8ag0m3JKSofkk9V4mO+WswxFDlWiM1P5Om7Ev7WsWSIYMqhN2viRjCscctrIkxh3trIgsb9qfw5snNYZvh+gHRQJ1GA0VYlLmqJLvasKcHSzKGabu8iRAnXMHaAv7jwgdMpHBz7uBeeQh+BIFqurSEotjRG+TlmidLA8X0BWiRTGiGp9X9mV/5Zm5QkBp1em8L1D9+wz8R9rn8eFPXMSHhlqocxKl7ZJgnzSfu9CS67y5k7PzSIjkViN01HTPzg36zyv9xzqVt5W+7rXbQJpmXLXfUAPsjRP/ns0a6ly0jkHoIOHqapZcJ8gVCVH46D0e5C59h57Q6iX/BW0f8VIsH4HfbSGi2doRqNVqbIRwdVnkzUMDihhKNvLFTh70H20v1uw6wNZclYF1wh9Lkn28TKqz/y45FbxhRwjBCvWu55R8/qSkfR2K/QyLw4WvE3raG23fssN2BYlNA/x9OaGBWPXVUZcphGl6rPUZeAqXVKms/qcRuLOzZrZMv42OeKFk/NzR8BrwiXN7NafhXrvH1CNN0b69t7jGqS5+sIwkBjNtD+J17G9G8qUB9ETH6C+uRO4MWJ+KesERdI3E0PIqzimTQiV60lzVL4kYB5KJuDnw0LAsxpu3a5VgKWIZzF/zWXZcBQTeea0IKRBEeujwTCecvaNTjd+x53jwTSobCyL4ADt2hcGHOGMcynuryZYh++XTMEjx0P/cMxXqHDXqb21liJftWmMzqyQ5HHQZCY6Mg1Lh8FsLaV3vyl142rbXan0NwolIGJ96QZ7PoNa9zeQOgcwXvGjHnpzZWsOwq/90Bnl1JDcm0MJpjAq2LnZN5r/7aa74TvC54Pu4jMMzZMdyrUS0bWAxF9NS2erfP2BPywI2AwSGgvl7qh2Sx4d/nh1984TTwtK5jDd+LIdml8SfVIcBfNG3dPvlrJN6TmvbBxtRRFo1lXX47axfr6kL6DNDUPTFbnZRjK0RLRuNdIueLhcUCLAJfVrP0jz4axcg12ZdRU4oPUTQg7m6blN5IjJu90GcHXia2kPXudSQidQLBIrE6RrZxUYO3DPwUXzVvOwYmuGzu2TJWS4vLYR00jDMCEv/Gosy0zurzs/zLCA/awGlR4c3InQo8IahyDh2faSNljCnfUPMMgfl/vE8BBODCKX18m2a+xvyHn+out4sB6MwBqRwINn5/QWKw8qqMOPS5rmLHvPUi8BdZZnetFk2najdRib7o1SdUG1Sn3pDOYRHXVXxoHxebSyAl5ybzis9PAlc9MTJnxM1qVEEdzwUBPElDuPOE8Zr2lYhz4/RKWnwd7BG2WUP3YYVyQmDL/H00xQCagUBoQ6CD3sKmTZSFkJUAKX3r1t+K1LqqjkyYP6XSvgp7ha8CsW4ssPhCFKgieUMR5T8cFVV2tSxLEJTlm15GLVFgiWtmTsHlZ32CU388BUYqVvtv4gNvgxOxfr9suFNa4V/xRTxlpsLjQ+GSSBMHznVykxf9Buk05CuuqfW8U4Ulgc+9LxXpKFcKAHjXe3Hj5RghtuOz+Nb+Iyi3sZibeLjqYoS0pWOE5g44azVPyeSunOWCNmlQI6lwEm/st6FoupwkI70X+V5Mthd90lnFpUtp49GlC81jJZ2zSiKV7ZFGsZfLEDQRU12S)
|
||||||
hudi:
|
hudi:
|
||||||
app-hdfs-path: hdfs://b2/apps/datalake/jars/app
|
app-hdfs-path: hdfs://b2/apps/datalake/jars/app
|
||||||
archive-hdfs-path: hdfs://b2/apps/datalake/flink/completed-jobs-hudi
|
archive-hdfs-path: hdfs://b2/apps/datalake/flink/completed-jobs-hudi
|
||||||
victoria-push-url: http://132.122.116.142:35710/api/v1/import/prometheus
|
victoria-push-url: http://132.122.116.142:35710/api/v1/import/prometheus
|
||||||
|
security:
|
||||||
|
authority: ENC(GXKnbq1LS11U2HaONspvH+D/TkIx13aWTaokdkzaF7HSvq6Z0Rv1+JUWFnYopVXu)
|
||||||
|
username: ENC(moIO5mO39V1Z+RDwROK9JXY4GfM8ZjDgM6Si7wRZ1MPVjbhTpmLz3lz28rAiw7c2LeCmizfJzHkEXIwGlB280g==)
|
||||||
|
darkcode: ENC(0jzpQ7T6S+P7bZrENgYsUoLhlqGvw7DA2MN3BRqEOwq7plhtg72vuuiPQNnr3DaYz0CpyTvxInhpx11W3VZ1trD6NINh7O3LN70ZqO5pWXk=)
|
||||||
hosts:
|
hosts:
|
||||||
- host: b5s119
|
- host: b5s119
|
||||||
ip: 132.122.116.142
|
ip: 132.122.116.142
|
||||||
|
|||||||
@@ -9,23 +9,18 @@ datetime=`date +%Y%m%d%H%M%S`
|
|||||||
log_path='${runtime.logPath}'
|
log_path='${runtime.logPath}'
|
||||||
loki_url='${runtime.lokiUrl}'
|
loki_url='${runtime.lokiUrl}'
|
||||||
eureka_url='${runtime.eurekaUrl}'
|
eureka_url='${runtime.eurekaUrl}'
|
||||||
<#--for host in <#noparse>${hosts[@]}</#noparse>
|
security_authority='${runtime.security.authority}'
|
||||||
do
|
security_username='${runtime.security.username}'
|
||||||
hostname=`ssh $host 'echo $HOSTNAME'`
|
security_darkcode='${runtime.security.darkcode}'
|
||||||
echo "$host $hostname"
|
|
||||||
ssh $host 'bash -s' < stop.sh ${runtime.jarPath}/${info.name}.jar
|
|
||||||
ssh $host "curl ftp://yyy:QeY\!68\)4nH1@132.121.122.15:2222/${info.sourceJar} -o ${runtime.jarPath}/${info.name}.jar"
|
|
||||||
ssh $host "nohup ${runtime.jdkPath} <#list environments?keys as key>-D${key?replace("_", ".")}=${environments[key]?string} </#list>-jar <#noparse>--datetime=${datetime} --hostname=${hostname} --eureka.instance.hostname=${hostname} --logging.parent=${log_path} --loki.url=${loki_url} --eureka.client.service-url.defaultZone=${eureka_url}</#noparse> ${runtime.jarPath}/${info.name}.jar <#list arguments?keys as key>--${key?replace("_", ".")}=${arguments[key]?string} </#list>> /dev/null 2>&1 &"
|
|
||||||
done-->
|
|
||||||
<#list hosts as host>
|
|
||||||
|
|
||||||
|
<#list hosts as host>
|
||||||
host=${host}
|
host=${host}
|
||||||
hostname=`ssh $host 'echo $HOSTNAME'`
|
hostname=`ssh $host 'echo $HOSTNAME'`
|
||||||
echo "${info.name} $host $hostname $datetime"
|
echo "${info.name} $host $hostname $datetime"
|
||||||
ssh $host 'bash -s' < stop.sh ${runtime.jarPath}/${info.name}.jar
|
ssh $host 'bash -s' < stop.sh ${runtime.jarPath}/${info.name}.jar
|
||||||
<#if selectedHosts?seq_contains(host)>
|
<#if selectedHosts?seq_contains(host)>
|
||||||
ssh $host "curl ftp://yyy:QeY\!68\)4nH1@132.121.122.15:2222/${info.sourceJar} -o ${runtime.jarPath}/${info.name}.jar"
|
ssh $host "curl ftp://yyy:QeY\!68\)4nH1@132.121.122.15:2222/${info.sourceJar} -o ${runtime.jarPath}/${info.name}.jar"
|
||||||
ssh $host "nohup ${runtime.jdkPath} <#list environments?keys as key>-D${key?replace("_", ".")}=${environments[key]?string} </#list>-jar ${runtime.jarPath}/${info.name}.jar<#noparse> --datetime=${datetime} --hostname=${hostname} --eureka.instance.hostname=${hostname} --logging.parent=${log_path} --loki.url=${loki_url} --eureka.client.service-url.defaultZone=${eureka_url}</#noparse> <#list arguments?keys as key>--${key?replace("_", ".")}=${arguments[key]?string} </#list>> /dev/null 2>&1 &"
|
ssh $host "export JASYPT_ENCRYPTOR_PASSWORD='r#(R,P\"Dp^A47>WSn:Wn].gs/+\"v:q_Q*An~zF*g-@j@jtSTv5H/,S-3:R?r9R}.';nohup ${runtime.jdkPath} <#list environments?keys as key>-D${key?replace("_", ".")}=${environments[key]?string} </#list>-jar ${runtime.jarPath}/${info.name}.jar<#noparse> --datetime=${datetime} --hostname=${hostname} --eureka.instance.hostname=${hostname} --logging.parent=${log_path} --loki.url=${loki_url} --eureka.client.service-url.defaultZone='${eureka_url}' --spring.security.meta.authority='${security_authority}' --spring.security.meta.username='${security_username}' --spring.security.meta.darkcode='${security_darkcode}'</#noparse> <#list arguments?keys as key>--${key?replace("_", ".")}=${arguments[key]?string} </#list>> /dev/null 2>&1 &"
|
||||||
</#if>
|
</#if>
|
||||||
echo ''
|
echo ''
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.lanyuanxiaoyao.service.configuration;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.datatype.eclipsecollections.EclipseCollectionsModule;
|
import com.fasterxml.jackson.datatype.eclipsecollections.EclipseCollectionsModule;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -14,11 +16,15 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class JacksonConfiguration {
|
public class JacksonConfiguration {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(JacksonConfiguration.class);
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||||
return builder -> {
|
return builder -> {
|
||||||
builder.modules(new EclipseCollectionsModule());
|
builder.modules(
|
||||||
builder.modules(new JavaTimeModule());
|
new EclipseCollectionsModule(),
|
||||||
|
new JavaTimeModule()
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
|||||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SecurityConfig.class);
|
private static final Logger logger = LoggerFactory.getLogger(SecurityConfig.class);
|
||||||
|
|
||||||
|
private final SecurityProperties securityProperties;
|
||||||
|
|
||||||
|
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
|
||||||
|
public SecurityConfig(SecurityProperties securityProperties) {
|
||||||
|
this.securityProperties = securityProperties;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http.authorizeHttpRequests()
|
http.authorizeHttpRequests()
|
||||||
@@ -37,8 +44,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
protected void configure(AuthenticationManagerBuilder builder) throws Exception {
|
protected void configure(AuthenticationManagerBuilder builder) throws Exception {
|
||||||
builder.inMemoryAuthentication()
|
builder.inMemoryAuthentication()
|
||||||
.withUser(Constants.SPRING_SECURITY_USERNAME)
|
.withUser(securityProperties.getUsername())
|
||||||
.password(Constants.SPRING_SECURITY_PASSWORD)
|
.password("{noop}" + securityProperties.getDarkcode())
|
||||||
.authorities(Constants.SPRING_SECURITY_AUTHORITY);
|
.authorities(securityProperties.getAuthority());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.lanyuanxiaoyao.service.configuration;
|
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lanyuanxiaoyao
|
||||||
|
* @date 2023-07-03
|
||||||
|
*/
|
||||||
|
@ConfigurationProperties("spring.security.meta")
|
||||||
|
@Component
|
||||||
|
public class SecurityProperties {
|
||||||
|
private String authority;
|
||||||
|
private String username;
|
||||||
|
private String darkcode;
|
||||||
|
|
||||||
|
public String getAuthority() {
|
||||||
|
return authority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthority(String authority) {
|
||||||
|
this.authority = authority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDarkcode() {
|
||||||
|
return darkcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDarkcode(String darkcode) {
|
||||||
|
this.darkcode = darkcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SecurityProperties{" +
|
||||||
|
"authority='" + authority + '\'' +
|
||||||
|
", username='" + username + '\'' +
|
||||||
|
", darkcode='" + darkcode + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -99,6 +99,11 @@
|
|||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.7.16</version>
|
<version>5.7.16</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.ulisesbocchio</groupId>
|
||||||
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.service.flink;
|
package com.lanyuanxiaoyao.service.flink;
|
||||||
|
|
||||||
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
||||||
@@ -23,6 +24,7 @@ import org.springframework.retry.annotation.EnableRetry;
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
public class FlinkQueryApplication {
|
public class FlinkQueryApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.service.hudi;
|
package com.lanyuanxiaoyao.service.hudi;
|
||||||
|
|
||||||
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
@@ -21,6 +22,7 @@ import org.springframework.retry.annotation.EnableRetry;
|
|||||||
exclude = {GsonAutoConfiguration.class}
|
exclude = {GsonAutoConfiguration.class}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
public class HudiQueryApplication implements ApplicationRunner {
|
public class HudiQueryApplication implements ApplicationRunner {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(HudiQueryApplication.class);
|
private static final Logger logger = LoggerFactory.getLogger(HudiQueryApplication.class);
|
||||||
@@ -31,5 +33,6 @@ public class HudiQueryApplication implements ApplicationRunner {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) {
|
public void run(ApplicationArguments args) {
|
||||||
|
// Test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.service.info;
|
package com.lanyuanxiaoyao.service.info;
|
||||||
|
|
||||||
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
@@ -25,6 +26,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||||||
exclude = {GsonAutoConfiguration.class}
|
exclude = {GsonAutoConfiguration.class}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
public class InfoQueryApplication {
|
public class InfoQueryApplication {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ spring:
|
|||||||
profiles:
|
profiles:
|
||||||
include: random-port,common,eureka,metrics
|
include: random-port,common,eureka,metrics
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://132.121.204.217:17906/iap-datahub?useSSL=false
|
url: ENC(tDeB9gYs1IHN90VV+KhNQAVEKSqeInEmFhgma7A0g6surB5pOyJC3lJx0QrvQo4zYz0WOhSgqjglHDSX7nh7k9ak3OQMgLYkHQGVawAZfcsGT/1m0csyjQzCxTCOZr5r)
|
||||||
username: odcp
|
username: ENC(29BKiU1cMKlA61gszFeYfWvoDVtLCCQAtfraxMq+f6Gm2LFu+67lkkBhoWgWIJga)
|
||||||
password: wFg_fR492#&
|
password: ENC(t+7GZM/tfqYeTlOugjcO6lUsHlacoVaomxLOeDpb6LhVB5+wbZHkKkW1xke8jNhQ)
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.lanyuanxiaoyao.service.loki;
|
|||||||
|
|
||||||
import com.lanyuanxiaoyao.service.configuration.entity.loki.LokiLogLine;
|
import com.lanyuanxiaoyao.service.configuration.entity.loki.LokiLogLine;
|
||||||
import com.lanyuanxiaoyao.service.loki.service.LokiQueryService;
|
import com.lanyuanxiaoyao.service.loki.service.LokiQueryService;
|
||||||
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
|
import java.util.Map;
|
||||||
import org.eclipse.collections.api.factory.Maps;
|
import org.eclipse.collections.api.factory.Maps;
|
||||||
import org.eclipse.collections.api.list.ImmutableList;
|
import org.eclipse.collections.api.list.ImmutableList;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -17,8 +19,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动类
|
* 启动类
|
||||||
*
|
*
|
||||||
@@ -31,6 +31,7 @@ import java.util.Map;
|
|||||||
exclude = {GsonAutoConfiguration.class}
|
exclude = {GsonAutoConfiguration.class}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
@RequestMapping("loki")
|
@RequestMapping("loki")
|
||||||
@RestController
|
@RestController
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarInfo;
|
|||||||
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarNamespace;
|
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarNamespace;
|
||||||
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarTenant;
|
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarTenant;
|
||||||
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarTopic;
|
import com.lanyuanxiaoyao.service.configuration.entity.pulsar.PulsarTopic;
|
||||||
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import org.apache.pulsar.client.admin.PulsarAdmin;
|
import org.apache.pulsar.client.admin.PulsarAdmin;
|
||||||
import org.apache.pulsar.client.admin.PulsarAdminException;
|
import org.apache.pulsar.client.admin.PulsarAdminException;
|
||||||
import org.apache.pulsar.client.api.MessageId;
|
import org.apache.pulsar.client.api.MessageId;
|
||||||
@@ -26,11 +31,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lanyuanxiaoyao
|
* @author lanyuanxiaoyao
|
||||||
* @date 2023-04-27
|
* @date 2023-04-27
|
||||||
@@ -44,6 +44,7 @@ import java.util.Map;
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("pulsar")
|
@RequestMapping("pulsar")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.service.web;
|
package com.lanyuanxiaoyao.service.web;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
@@ -8,10 +8,9 @@ import org.springframework.boot.ApplicationRunner;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
||||||
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.cache.annotation.EnableCaching;
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
import org.springframework.cloud.netflix.eureka.EurekaServiceInstance;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,6 +26,8 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
|||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@EnableAsync
|
@EnableAsync
|
||||||
@EnableCaching
|
@EnableCaching
|
||||||
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
public class WebApplication implements ApplicationRunner {
|
public class WebApplication implements ApplicationRunner {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(WebApplication.class);
|
private static final Logger logger = LoggerFactory.getLogger(WebApplication.class);
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@ public class WebApplication implements ApplicationRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
public void run(ApplicationArguments args) {
|
||||||
|
// Test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.service.yarn;
|
package com.lanyuanxiaoyao.service.yarn;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.service.yarn.configuration.YarnConfiguration;
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationArguments;
|
||||||
@@ -29,23 +29,18 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
public class YarnQueryApplication implements ApplicationRunner {
|
public class YarnQueryApplication implements ApplicationRunner {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(YarnQueryApplication.class);
|
private static final Logger logger = LoggerFactory.getLogger(YarnQueryApplication.class);
|
||||||
|
|
||||||
public YarnQueryApplication(YarnConfiguration yarnConfiguration) {
|
|
||||||
this.yarnConfiguration = yarnConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(YarnQueryApplication.class, args);
|
SpringApplication.run(YarnQueryApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final YarnConfiguration yarnConfiguration;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
public void run(ApplicationArguments args) {
|
||||||
logger.info("Yarn configuration: {}", yarnConfiguration);
|
// Test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.lanyuanxiaoyao.service.zookeeper;
|
package com.lanyuanxiaoyao.service.zookeeper;
|
||||||
|
|
||||||
|
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
import org.springframework.retry.annotation.EnableRetry;
|
import org.springframework.retry.annotation.EnableRetry;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zk 查询
|
* zk 查询
|
||||||
@@ -21,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
exclude = {GsonAutoConfiguration.class}
|
exclude = {GsonAutoConfiguration.class}
|
||||||
)
|
)
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
|
@EnableEncryptableProperties
|
||||||
@EnableRetry
|
@EnableRetry
|
||||||
public class ZookeeperQueryApplication {
|
public class ZookeeperQueryApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -45,4 +45,7 @@ GET http://{{username}}:{{password}}@132.122.116.146:18166/info/compaction_metri
|
|||||||
GET http://{{username}}:{{password}}@132.122.116.150:27510/table/list_compaction_metrics?search_flink_job_id=1542097996099055616&search_alias=acct_acct_item_fs
|
GET http://{{username}}:{{password}}@132.122.116.150:27510/table/list_compaction_metrics?search_flink_job_id=1542097996099055616&search_alias=acct_acct_item_fs
|
||||||
|
|
||||||
### Query Scheduler
|
### Query Scheduler
|
||||||
GET {{scheduler-url}}/schedule/all_un_scheduled
|
GET {{scheduler-url}}/schedule/all_focus
|
||||||
|
|
||||||
|
### Yarn query
|
||||||
|
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.143:34903/job/list?cluster=a4
|
||||||
|
|||||||
Reference in New Issue
Block a user