[PPN-211113] Modify application properties

This commit is contained in:
woo-jin.shin
2021-11-21 13:30:44 +09:00
parent bbf4affc16
commit 1505227037
19 changed files with 296 additions and 108 deletions

View File

@@ -0,0 +1,31 @@
package com.myoa.engineering.crawl.ppomppu.sender.controller;
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.APIResponse;
import com.myoa.engineering.crawl.ppomppu.support.dto.SimpleMessageDTO;
import lombok.extern.slf4j.Slf4j;
import reactor.core.publisher.Mono;
/**
* MessageSenderAPIController
* @author Shin Woo-jin (woo-jin.shin@linecorp.com)
* @since 2021-11-21
*
*/
@Slf4j
@RestController
@RequestMapping("/api/v1")
public class MessageSenderAPIController {
@PostMapping("/messages/sendMessage/messengers/slack")
public Mono<APIResponse<SimpleMessageDTO>> sendMessageToSlack(SimpleMessageDTO dto) {
log.info("received : {}, \nbody: {}", dto.getTitle(), dto.getBody());
// TODO transform
return Mono.just(APIResponse.success(dto));
}
}

View File

@@ -3,12 +3,8 @@ spring:
activate:
on-profile: development
import:
- classpath:/development/webclient.yml
- "configserver:http://192.168.0.100:11080"
# import: optional:configserver:http://localhost:11080 # can be start up even config server was not found.
profiles:
group:
development: development, slackapi-development
server:
port: 20081
port: 20082

View File

@@ -2,5 +2,5 @@ spring:
config:
activate:
on-profile: production
# import:
# - classpath:/production/webclient.yml
import:
- "configserver:http://192.168.0.100:11080"

View File

@@ -5,9 +5,17 @@ spring:
allow-bean-definition-overriding: true
profiles:
active: ${SPRING_ACTIVE_PROFILE:development}
group:
development: development, slackapi-development
production: production, slackapi-production
freemarker:
enabled: false
jpa:
hibernate:
ddl-auto: create-drop
generate-ddl: true
server:
port: 20080
error: