Implement ProcessorAPIWebClient
This commit is contained in:
23
processor/build.gradle
Normal file
23
processor/build.gradle
Normal file
@@ -0,0 +1,23 @@
|
||||
dependencies {
|
||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||
runtimeOnly 'com.h2database:h2'
|
||||
runtimeOnly 'mysql:mysql-connector-java'
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
|
||||
implementation project(':support')
|
||||
// https://projectreactor.io/docs/core/release/reference/#debug-activate
|
||||
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
||||
implementation 'org.telegram:telegrambots:5.3.0'
|
||||
|
||||
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed"
|
||||
}
|
||||
}
|
||||
@@ -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