Added server config

This commit is contained in:
Andrey Terentev 2023-11-26 15:51:38 +07:00
parent 8220fdc698
commit abd8eef0f9

View File

@ -0,0 +1,19 @@
package ru.dragonestia.loadbalancer.web.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.net.URI;
@Configuration
public class ServerConfig {
@Value("${DLB_HOST_URL:http://localhost:8080/}")
private String serverUrl;
@Bean
URI serverUrl() {
return URI.create(serverUrl);
}
}