datax模块
parent
a4dd90d22c
commit
63452aff85
|
@ -17,7 +17,7 @@ spring:
|
|||
# 命名空间,默认:public
|
||||
namespace: c5d32e76-b83c-4254-8176-1c6a2cee8e3b
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
group: srt2.1
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||
|
|
|
@ -70,9 +70,62 @@
|
|||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.srt</groupId>
|
||||
<artifactId>srt-cloud-data-integrate</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<!-- mvn install:install-file -Dfile=D:/Student_IDEA/srt-cloud/data-center/srt-cloud-module/srt-cloud-datax/src/main/java/net/srt/datax/lib/datax-core-0.0.1-SNAPSHOT.jar -DgroupId=com.alibaba.datax -DartifactId=datax-core -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.datax</groupId>
|
||||
<artifactId>datax-core</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- mvn install:install-file -Dfile=lib/datax-common-0.0.1-SNAPSHOT.jar -DgroupId=com.alibaba.datax -DartifactId=datax-common -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.datax</groupId>
|
||||
<artifactId>datax-common</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- mvn install:install-file -Dfile=lib/datax-transformer-0.0.1-SNAPSHOT.jar -DgroupId=com.alibaba.datax -DartifactId=datax-transformer -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.datax</groupId>
|
||||
<artifactId>datax-transformer</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mvn install:install-file -Dfile=lib/datax-core-0.0.1-SNAPSHOT.jar -DgroupId=com.alibaba.datax -DartifactId=mysqlreader -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.datax</groupId>
|
||||
<artifactId>mysqlreader</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mvn install:install-file -Dfile=lib/datax-core-0.0.1-SNAPSHOT.jar -DgroupId=com.alibaba.datax -DartifactId=mysqlwriter -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
|
||||
-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.datax</groupId>-->
|
||||
<!-- <artifactId>mysqlwriter</artifactId>-->
|
||||
<!-- <version>0.0.1-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- mvn install:install-file -Dfile=lib/datax-core-0.0.1-SNAPSHOT.jar -DgroupId=com.alibaba.datax -DartifactId=oraclereader -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.datax</groupId>
|
||||
<artifactId>oraclereader</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<!--<finalName>${project.artifactId}</finalName>-->
|
||||
<plugins>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package net.srt;
|
||||
package net.srt.datax;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* @ClassName StuApp
|
||||
|
@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
|||
@EnableFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackages = "net.srt.framework.common.cache")
|
||||
public class DataxApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DataxApp.class);
|
Binary file not shown.
|
@ -26,7 +26,7 @@ public class DataxController {
|
|||
|
||||
@Operation(summary = "查询列表")
|
||||
@PostMapping("/list")
|
||||
public Result<List<StrDatax>> stuList() {
|
||||
public Result<List<StrDatax>> list() {
|
||||
List<StrDatax> stuList = dataxService.dataxList();
|
||||
return Result.ok(stuList);
|
||||
}
|
||||
|
@ -40,14 +40,14 @@ public class DataxController {
|
|||
|
||||
@Operation(summary = "修改列表")
|
||||
@PostMapping("/update")
|
||||
public Result<StrDatax> updateDatax(@RequestBody StrDatax strDatax) {
|
||||
public Result<StrDatax> update(@RequestBody StrDatax strDatax) {
|
||||
dataxService.updateStrDatax(strDatax);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "删除列表")
|
||||
@PostMapping("/del/{id}")
|
||||
public Result<String> delDatax(@PathVariable Long id) {
|
||||
public Result<String> del(@PathVariable Long id) {
|
||||
dataxService.delStrDatax(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
@ -61,5 +61,13 @@ public class DataxController {
|
|||
return Result.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "执行")
|
||||
@PostMapping("/datax/{id}")
|
||||
public Result datax(@PathVariable Long id) {
|
||||
dataxService.datax(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package net.srt.datax.feign;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import net.srt.datax.feign.impl.DataAccessFeignImpl;
|
||||
import net.srt.dto.DataAccessClientDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
/**
|
||||
* @author : WangZhanpeng
|
||||
* @date : 2023/12/15 19:26
|
||||
*/
|
||||
@FeignClient(name = "srt-cloud-data-integrate",fallback = DataAccessFeignImpl.class)
|
||||
public interface DataAccessFeign {
|
||||
|
||||
@GetMapping("/database/{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('data-integrate:access:info')")
|
||||
public Result<DataAccessClientDto> get(@PathVariable("id") Long id);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package net.srt.datax.feign.impl;
|
||||
|
||||
import net.srt.datax.feign.DataAccessFeign;
|
||||
import net.srt.dto.DataAccessClientDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
|
||||
/**
|
||||
* @author : WangZhanpeng
|
||||
* @date : 2023/12/15 19:28
|
||||
*/
|
||||
public class DataAccessFeignImpl implements DataAccessFeign {
|
||||
@Override
|
||||
public Result<DataAccessClientDto> get(Long id) {
|
||||
return Result.error("服务器繁忙,请稍等~~~~");
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue