add distr
This commit is contained in:
parent
72de7e595a
commit
7b11adfa2e
6 changed files with 66 additions and 4 deletions
|
|
@ -18,8 +18,8 @@ public class DefaultController implements InitializingBean {
|
||||||
@RequestMapping(method = RequestMethod.GET, path = "/anonymous/method1", produces = MediaType.TEXT_PLAIN_VALUE)
|
@RequestMapping(method = RequestMethod.GET, path = "/anonymous/method1", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String processGet() {
|
public String processGet() {
|
||||||
log.info("controller method1");
|
log.info("Call test method for backend-api controller");
|
||||||
return "use post";
|
return "backend-api controller test method";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.GET, path = "/users/method2", produces = MediaType.TEXT_PLAIN_VALUE)
|
@RequestMapping(method = RequestMethod.GET, path = "/users/method2", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package ru.spcex.clearing.dbf.exporter.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
@Controller("/")
|
||||||
|
public class DefaultController implements InitializingBean {
|
||||||
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@RequestMapping(method = RequestMethod.GET, path = "/test", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||||
|
@ResponseBody
|
||||||
|
public String processGet() {
|
||||||
|
log.info("Call test method for exporter controller");
|
||||||
|
return "exporter controller test method";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterPropertiesSet() throws Exception {
|
||||||
|
log.info("controller started");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -22,6 +22,10 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package ru.spcex.clearing.dbf.importer.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
@Controller("/")
|
||||||
|
public class DefaultController implements InitializingBean {
|
||||||
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@RequestMapping(method = RequestMethod.GET, path = "/test", produces = MediaType.TEXT_PLAIN_VALUE)
|
||||||
|
@ResponseBody
|
||||||
|
public String processGet() {
|
||||||
|
log.info("Call test method for importer controller");
|
||||||
|
return "importer controller test method";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterPropertiesSet() throws Exception {
|
||||||
|
log.info("controller started");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -11,7 +11,6 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
//@EnableScheduling
|
|
||||||
public class DBFLoaderService {
|
public class DBFLoaderService {
|
||||||
private final AProperties properties;
|
private final AProperties properties;
|
||||||
private final MessageListener messageListener;
|
private final MessageListener messageListener;
|
||||||
|
|
@ -25,7 +24,6 @@ public class DBFLoaderService {
|
||||||
this.pipeline = pipeline;
|
this.pipeline = pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Scheduled(fixedDelayString = "${dbf.execute-timeout}")
|
|
||||||
public void run() {
|
public void run() {
|
||||||
List<ResultContainer> newTaskList = messageListener.getTasks();
|
List<ResultContainer> newTaskList = messageListener.getTasks();
|
||||||
for (ResultContainer newTask : newTaskList) {
|
for (ResultContainer newTask : newTaskList) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue