Implement ProcessorAPIWebClient
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
package com.myoa.engineering.crawl.ppomppu.processor;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* ProcessorApplication
|
||||
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
|
||||
* @since 2021-08-20
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class ProcessorApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ProcessorApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.myoa.engineering.crawl.ppomppu.processor.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.myoa.engineering.crawl.ppomppu.support.dto.code.PpomppuBoardName;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* CrawlAPIController
|
||||
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
|
||||
* @since 2021-09-05
|
||||
*
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/crawl")
|
||||
public class CrawlAPIController {
|
||||
|
||||
@PostMapping("/boards/{boardName}")
|
||||
public Mono<String> crawlBoard(@PathVariable("boardName") PpomppuBoardName boardName) {
|
||||
log.info("got request... {}", boardName);
|
||||
return Mono.just(boardName.getBoardPath());
|
||||
}
|
||||
|
||||
}
|
||||
6
processor/src/main/resources/application-development.yml
Normal file
6
processor/src/main/resources/application-development.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: development
|
||||
import:
|
||||
- classpath:/development/webclient.yml
|
||||
@@ -0,0 +1,14 @@
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
profiles:
|
||||
active: development
|
||||
freemarker:
|
||||
enabled: false
|
||||
|
||||
|
||||
server:
|
||||
port: 20081
|
||||
error:
|
||||
whitelabel:
|
||||
enabled: false
|
||||
Reference in New Issue
Block a user