First major release #68
@ -2,6 +2,7 @@ package com.hithomelabs.CFTunnels.Config;
|
|||||||
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
import io.swagger.v3.oas.models.servers.Server;
|
import io.swagger.v3.oas.models.servers.Server;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@ -10,9 +11,12 @@ import java.util.ArrayList;
|
|||||||
@Configuration
|
@Configuration
|
||||||
public class OpenApiConfig {
|
public class OpenApiConfig {
|
||||||
|
|
||||||
|
@Value("${api.baseUrl}")
|
||||||
|
private String baseUrl;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI openAPI(){
|
public OpenAPI openAPI(){
|
||||||
Server httpsServer = new Server().url("https://testcf.hithomelabs.com");
|
Server httpsServer = new Server().url(baseUrl);
|
||||||
OpenAPI openApi = new OpenAPI();
|
OpenAPI openApi = new OpenAPI();
|
||||||
ArrayList<Server> servers = new ArrayList<>();
|
ArrayList<Server> servers = new ArrayList<>();
|
||||||
servers.add(httpsServer);
|
servers.add(httpsServer);
|
||||||
|
|||||||
1
src/main/resources/application-local.properties
Normal file
1
src/main/resources/application-local.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
api.baseUrl=http://localhost:8080
|
||||||
1
src/main/resources/application-prod.properties
Normal file
1
src/main/resources/application-prod.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
api.baseUrl=https://cftunnels.hithomelabs.com
|
||||||
1
src/main/resources/application-test.properties
Normal file
1
src/main/resources/application-test.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
api.baseUrl=https://testcf.hithomelabs.com
|
||||||
@ -2,3 +2,4 @@ spring.application.name=CFTunnels
|
|||||||
cloudflare.accountId=${CLOUDFLARE_ACCOUNT_ID}
|
cloudflare.accountId=${CLOUDFLARE_ACCOUNT_ID}
|
||||||
cloudflare.apiKey=${CLOUDFLARE_API_KEY}
|
cloudflare.apiKey=${CLOUDFLARE_API_KEY}
|
||||||
cloudflare.email=${CLOUDFLARE_EMAIL}
|
cloudflare.email=${CLOUDFLARE_EMAIL}
|
||||||
|
spring.profiles.active=${ENV}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user