add distr

This commit is contained in:
etreshenkov 2022-08-04 12:27:19 +03:00
parent 72de7e595a
commit 7b11adfa2e
6 changed files with 66 additions and 4 deletions

View file

@ -18,8 +18,8 @@ public class DefaultController implements InitializingBean {
@RequestMapping(method = RequestMethod.GET, path = "/anonymous/method1", produces = MediaType.TEXT_PLAIN_VALUE)
@ResponseBody
public String processGet() {
log.info("controller method1");
return "use post";
log.info("Call test method for backend-api controller");
return "backend-api controller test method";
}
@RequestMapping(method = RequestMethod.GET, path = "/users/method2", produces = MediaType.TEXT_PLAIN_VALUE)

View file

@ -21,6 +21,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>

View file

@ -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");
}
}

View file

@ -22,6 +22,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>

View file

@ -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");
}
}

View file

@ -11,7 +11,6 @@ import java.util.Arrays;
import java.util.List;
@Service
//@EnableScheduling
public class DBFLoaderService {
private final AProperties properties;
private final MessageListener messageListener;
@ -25,7 +24,6 @@ public class DBFLoaderService {
this.pipeline = pipeline;
}
// @Scheduled(fixedDelayString = "${dbf.execute-timeout}")
public void run() {
List<ResultContainer> newTaskList = messageListener.getTasks();
for (ResultContainer newTask : newTaskList) {