Added server config
This commit is contained in:
parent
8220fdc698
commit
abd8eef0f9
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user