-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DSND-2697: Consolidate env variables to application properties (#122)
* DSND-2697: Consolidate .yml file into application.properties *delete application.yml file. *put all env variables into application.properties file. * DSND-2697: Remove all unnecessary env variables * unnecessary logger.namespace env replaced with application.namespace * any unnecessary variables in application.properties or pom removed
- Loading branch information
1 parent
043291d
commit e39b116
Showing
6 changed files
with
24 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
src/main/java/uk/gov/companieshouse/pscdataapi/config/LoggingConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
package uk.gov.companieshouse.pscdataapi.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import uk.gov.companieshouse.logging.Logger; | ||
import uk.gov.companieshouse.logging.LoggerFactory; | ||
import uk.gov.companieshouse.pscdataapi.PscDataApiApplication; | ||
|
||
/** | ||
* Configuration class for logging. | ||
*/ | ||
@Configuration | ||
public class LoggingConfig { | ||
|
||
@Value("${logger.namespace}") | ||
private String loggerNamespace; | ||
|
||
/** | ||
* Creates a logger with specified namespace. | ||
* | ||
* @return the {@link LoggerFactory} for the specified namespace | ||
*/ | ||
@Bean | ||
public Logger logger() { | ||
return LoggerFactory.getLogger(loggerNamespace); | ||
return LoggerFactory.getLogger(PscDataApiApplication.APPLICATION_NAME_SPACE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
management.endpoints.web.base-path=/psc-data-api | ||
management.endpoints.web.path-mapping.health=/healthcheck | ||
chs.api.kafka.uri=/private/resource-changed | ||
chs.api.kafka.kind=someKind | ||
|
||
chs.api.kafka.url=${CHS_KAFKA_API_URL:localhost} | ||
chs.api.kafka.resource-changed.uri=${PSC_API_RESOURCE_CHANGED_URI:/private/resource-changed} | ||
chs.api.metrics.url=${API_LOCAL_URL:localhost} | ||
|
||
spring.data.mongodb.uri=${MONGODB_URL:mongodb://mongo:27017} | ||
spring.data.mongodb.name=company_pscs | ||
|
||
spring.data.jackson.default-property-inclusion=NON_NULL | ||
|
||
feature.seeding_collection_enabled=${SEEDING_COLLECTION_ENABLED:false} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters