Add properties

This commit is contained in:
woo-jin.shin 2021-08-22 17:43:52 +09:00
parent 41bc9cad37
commit a60e242e29
10 changed files with 74 additions and 2 deletions

View File

@ -4,14 +4,15 @@ dependencies {
runtimeOnly 'mysql:mysql-connector-java'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-web'
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 {

View File

@ -0,0 +1,22 @@
package com.myoa.engineering.music.soundhoundfound.receiver.infrastructure.client;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;
import java.util.List;
@Component
public class ProcessorAPIWebClient {
@Value("${webclient.some}")
private String baseUrl;
private final WebClient webClient;
public ProcessorAPIWebClient(WebClient.Builder webClientBuilder) {
this.webClient = webClientBuilder.baseUrl("soundhoundfound-processor:20080")
.build();
}
}

View File

@ -0,0 +1,6 @@
spring:
config:
activate:
on-profile: development
import:
- classpath:/development/webclient.yml

View File

@ -0,0 +1,6 @@
spring:
config:
activate:
on-profile: production
import:
- classpath:/production/webclient.yml

View File

@ -0,0 +1,10 @@
spring:
main:
allow-bean-definition-overriding: true
profiles:
active: development
freemarker:
enabled: false
webclient:
some: not-test

View File

@ -0,0 +1,7 @@
package com.myoa.engineering.music.soundhoundfound.support.util;
public final class NumberUtil {
private NumberUtil() {}
}

View File

@ -0,0 +1,7 @@
package com.myoa.engineering.music.soundhoundfound.support.util;
public final class ObjectUtil {
private ObjectUtil() {}
}

View File

@ -0,0 +1,4 @@
package com.myoa.engineering.music.soundhoundfound.support.webclient;
public interface WebClientBaseScan {
}

View File

@ -0,0 +1,5 @@
webclient:
some: test
units:
- unit-name: processor-api
base-url: http://localhost:20081

View File

@ -0,0 +1,4 @@
webclient:
units:
- unit-name: processor-api
base-url: http://soundhoundfound-processor:20080