Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

合并手动输入同义词功能 #68

Merged
merged 29 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3257672
New function added: implement SSO with DSS
schumiyi Aug 27, 2020
9eb04c3
修复弱密码问题
schumiyi Nov 6, 2020
1cb10ce
Merge pull request #1 from WeBankFinTech/master
schumiyi Nov 6, 2020
2217ea5
fix addgroup error
det101 Dec 8, 2020
2252a48
Merge branch 'master' of https://github.com/kingsGlory/Exchangis
det101 Dec 8, 2020
57042ae
Merge pull request #2 from WeBankFinTech/master
schumiyi Dec 9, 2020
b7e5ea5
Merge pull request #3 from WeBankFinTech/master
Dec 21, 2020
4242875
add monitor
Dec 21, 2020
a597556
'ignore'
Dec 21, 2020
21430f2
add true
Dec 21, 2020
c42075c
api auth config
Dec 21, 2020
578ddb5
提交最新代码
det101 Dec 25, 2020
2b65bcf
fix bug dumplate key
Dec 25, 2020
ec6fd9f
Merge branch 'master' of github.com:kingsGlory/Exchangis
Dec 25, 2020
41ade3b
fix bug for dumplicate key
Dec 25, 2020
2114910
add monitor
Jan 6, 2021
a1b3e28
add message exchange.oracle_meta.get.table.by.user.input.failed
Jan 12, 2021
610c8a3
add function check table
Jan 12, 2021
3c816f4
check oralce table
Jan 12, 2021
ea28d32
任务配置oracle可以手输表名
Jan 15, 2021
dbdc870
新增任务数据库为Oracle
Jan 18, 2021
757e181
任务配置数据库为Oracle时可以手写表名
Jan 18, 2021
94b48b4
任务配置数据库为Oracle时可以手写表名
Jan 19, 2021
358de82
finish oracle read data
Jan 26, 2021
4db32c2
Merge branch 'master' into master
393562632 Feb 1, 2021
263b58e
替换静态资源
Feb 2, 2021
25d7e41
merge code
Feb 3, 2021
44bd876
merge file
Feb 3, 2021
ff8a712
Merge branch 'master' into master
393562632 Feb 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/target/

target

### STS ###
.apt_generated
Expand Down
Empty file.
12 changes: 12 additions & 0 deletions log.path_IS_UNDEFINED/exchangis-service.2020-12-25-0.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
2020-12-25 16:59:54.827 INFO 9000 --- [main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7a7471ce: startup date [Fri Dec 25 16:59:54 CST 2020]; root of context hierarchy
2020-12-25 16:59:55.174 INFO 9000 --- [main] ptablePropertiesBeanFactoryPostProcessor : Post-processing PropertySource instances
2020-12-25 16:59:55.297 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2020-12-25 16:59:55.300 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource bootstrap [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2020-12-25 16:59:55.302 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2020-12-25 16:59:55.303 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper
2020-12-25 16:59:55.304 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2020-12-25 16:59:55.305 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper
2020-12-25 16:59:55.305 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationConfig: [classpath:/bootstrap.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2020-12-25 16:59:55.305 INFO 9000 --- [main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationConfig: [classpath:/bootstrap.yml] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2020-12-25 16:59:55.330 INFO 9000 --- [main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2020-12-25 16:59:55.394 INFO 9000 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$6a33a2c6] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ public AuthTokenHelper tokenBuilder(@Value("${auth.token.api:token}")String toke
@Value("${auth.login.url:/udes/auth/login}")
private String authLoginUrl;

@Value("${auth.redirect.url:/udes/auth/redirect}")
private String authRedirectUrl;

public boolean enable(){
return authSwitch;
}
Expand Down Expand Up @@ -115,6 +118,10 @@ public String authLoginUrl(){
return authLoginUrl;
}

public String authRedirectUrl(){
return authRedirectUrl;
}

public String authSecret(){
return authSecret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public class AuthenticationInterceptor implements HandlerInterceptor{

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if(conf.enable() && !request.getRequestURI().equals(conf.authLoginUrl())){
if(conf.enable() && !request.getRequestURI().equals(conf.authLoginUrl()) &&
!request.getRequestURI().equals(conf.authRedirectUrl())){
if(null == authTokenService){
authTokenService = AppUtil.getBean(AuthTokenService.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public class AuthorityInterceptor implements HandlerInterceptor {
private AuthTokenHelper authTokenHelper;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if(conf.enable() && !request.getRequestURI().equals(conf.authLoginUrl())) {
if(conf.enable() && !request.getRequestURI().equals(conf.authLoginUrl())
&& !request.getRequestURI().equals(conf.authRedirectUrl())) {
String token = AppUtil.getCookieValue(request, AuthConstraints.DEFAULT_SSO_COOKIE);
Map<String, String> headers = authTokenHelper.getAuthHeader(token);
String loginId = headers.get(X_AUTH_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
public abstract class AbstractGenericService<T> implements IBaseService<T> {

private static final Logger logger = LoggerFactory.getLogger(AbstractGenericService.class);

protected abstract IBaseDao<T> getDao();

/**
* Add
*
*/
@Override
public boolean add(T t) {
Expand Down Expand Up @@ -71,7 +71,6 @@ public boolean delete(String ids) {

/**
* Update
*
*/
@Override
public boolean update(T t) {
Expand All @@ -80,7 +79,6 @@ public boolean update(T t) {

/**
* (non-Javadoc)
*
*/
@Override
@Transactional(readOnly = true)
Expand All @@ -90,7 +88,6 @@ public long getCount(PageQuery pageQuery) {

/**
* Get
*
*/
@Override
@Transactional(readOnly = true)
Expand All @@ -116,6 +113,7 @@ public PageList<T> findPage(PageQuery pageQuery) {

/**
* Select all
*
* @return
*/
@Override
Expand All @@ -126,16 +124,17 @@ public List<T> selectAllList(PageQuery pageQuery) {

/**
* Filter of query
*
* @param t data
* @return
*/
protected T queryFilter(T t){
protected T queryFilter(T t) {
return t;
}

final protected List<T> queryFilter(List<T> list){
final protected List<T> queryFilter(List<T> list) {
List<T> result = new ArrayList<>();
for(T t : list){
for (T t : list) {
result.add(queryFilter(t));
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public interface IBaseService<T> {
*/
boolean add(T t);

/**s
/**
* s
* Delete batch(collection)
*
* @return
Expand Down
4 changes: 4 additions & 0 deletions modules/eureka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<artifactId>xstream</artifactId>
<version>1.4.15</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@

package com.webank.wedatasphere.exchangis;

import io.micrometer.core.instrument.MeterRegistry;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;

import java.io.IOException;
import java.lang.management.ManagementFactory;
Expand Down Expand Up @@ -66,4 +69,12 @@ private static void savePID(String pidFile) throws IOException {
private static void removePID(String pidFile) throws IOException{
Files.delete(Paths.get(pidFile));
}

@Bean
MeterRegistryCustomizer meterRegistryCustomizer(MeterRegistry meterRegistry) {
return meterRegistry1 -> {
meterRegistry.config()
.commonTags("application", "EurekaApplication");
};
}
}
13 changes: 13 additions & 0 deletions modules/eureka/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,17 @@ eureka:
enable-self-preservation: false
eviction-interval-timer-in-ms: 10000

management:
metrics:
export:
prometheus:
enabled: true
endpoints:
web:
#http暴露所有监控项
exposure:
include: '*'
#uri,可自定义
base-path: /actuator


Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

import com.webank.wedatasphere.exchangis.common.util.ProcessUtil;
import com.webank.wedatasphere.exchangis.route.feign.FeginClientConfig;
import io.micrometer.core.instrument.MeterRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
Expand All @@ -31,6 +33,7 @@
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
* Created by devendeng on 2018/8/28.
Expand All @@ -51,4 +54,13 @@ public static void main(String[] args) {
}
SpringApplication.run(ExecutorApplication.class, args);
}

@Bean
MeterRegistryCustomizer meterRegistryCustomizer(MeterRegistry meterRegistry) {
return meterRegistry1 -> {
meterRegistry.config()
.commonTags("application", "ExecutorApplication");
//所有指标添加统一标签: application = Tenantapp
};
}
}
14 changes: 14 additions & 0 deletions modules/executor/core/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@ eureka:
auth:
token:
api: ENC(doiaIecpZ6QpeVvqcayuWuuWC1C5Nf1V)


management:
metrics:
export:
prometheus:
enabled: true
endpoints:
web:
#http暴露所有监控项
exposure:
include: '*'
#uri,可自定义
base-path: /actuator
6 changes: 6 additions & 0 deletions modules/executor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<module>engine/datax</module>
<module>core</module>
</modules>
<dependencies>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
<parent>
<groupId>com.webank.wedatasphere.exchangis</groupId>
<artifactId>exchangis</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
import com.webank.wedatasphere.exchangis.common.controller.SecurityUtil;
import com.webank.wedatasphere.exchangis.common.util.spring.AppUtil;
import com.webank.wedatasphere.exchangis.gateway.filters.CorsGatewayFilter;
import io.micrometer.core.instrument.MeterRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
Expand Down Expand Up @@ -102,4 +104,13 @@ public static void main(String[] args) {
}
SpringApplication.run(WebApplication.class, args);
}

@Bean
MeterRegistryCustomizer meterRegistryCustomizer(MeterRegistry meterRegistry) {
return meterRegistry1 -> {
meterRegistry.config()
.commonTags("application", "WebApplication");
//所有指标添加统一标签: application = Tenantapp
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
}
String umPwd = pwd.substring(userName.length());
//TODO Use Feign to do login
boolean loginResult = false;
boolean loginResult = true;
if(loginResult) {
AuthTokenBean tokenBean = new AuthTokenBean();
tokenBean.getHeaders().put(AuthConstraints.X_AUTH_ID, userName);
Expand Down
16 changes: 15 additions & 1 deletion modules/gateway/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,18 @@ eureka:
prefer-ip-address: true #IP
client:
serviceUrl:
defaultZone: ${EUREKA_SERVICE_URL}
defaultZone: ${EUREKA_SERVICE_URL}


management:
metrics:
export:
prometheus:
enabled: true
endpoints:
web:
#http暴露所有监控项
exposure:
include: '*'
#uri,可自定义
base-path: /actuator
Loading