This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 693
Creates spring-cloud-gcp-autoconfigure module #276
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
f2624c8
Creates spring-cloud-gcp-autoconfigure module
joaoandremartins 932a437
Adds spring-cloud-context to config sample
joaoandremartins 1ec45bf
Adds spring-cloud-gcp-config to starter's dependencies
joaoandremartins 41aea29
Adds static test dep again
joaoandremartins 9213f28
Splits core starter into autoconfigure and core module
joaoandremartins c669ea9
Removes unnecessary annotation
joaoandremartins 203d0cf
Merge branch 'master' into gh-262-autoconfigure-module
joaoandremartins 0a4362a
Fixes stalled build
joaoandremartins 2942c60
Adds GcpConfigAutoConfiguration back to autoconfigure's spring.factories
joaoandremartins 13dd3d6
Merge branch 'master' into gh-262-autoconfigure-module
joaoandremartins 8303715
EOF new line in spring.factories
joaoandremartins 0f609e0
snicoll's code review
joaoandremartins 2287602
fixes spring.provides
joaoandremartins 77364d4
removes unnecessary spring.factories
joaoandremartins b231149
fixes build
joaoandremartins ac3dedb
Finish killing spring-cloud-gcp-config
joaoandremartins 2de9f93
fix build again
joaoandremartins a53aef5
Merge branch 'master' into gh-262-autoconfigure-module
joaoandremartins 902eea3
Adds the config module back in
joaoandremartins 2b7852a
Adds GoogleConfigPropertySourceLocator to the bootstrap configurators
joaoandremartins 5813ae8
Fixes Javadoc and other bits
joaoandremartins 0d47060
Adds necessary spring.factories
joaoandremartins c5486c7
Changes import order to fix build in rare conditions
joaoandremartins 2ccc845
Fixes indentation
joaoandremartins 1da213a
Fix indentation
joaoandremartins 96c58fd
New line
joaoandremartins 2d39c0d
Merge branch 'master' into gh-262-autoconfigure-module
joaoandremartins 7c3da59
Merge branch 'master' into gh-262-autoconfigure-module
joaoandremartins 252a533
Changes commons-logging's scope to test
joaoandremartins 13c45aa
Fixes issues with AppEngineCondition
joaoandremartins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>spring-cloud-gcp</artifactId> | ||
<groupId>org.springframework.cloud</groupId> | ||
<version>1.0.0.BUILD-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>spring-cloud-gcp-autoconfigure</artifactId> | ||
<name>Spring Cloud GCP Autoconfigure Module</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-autoconfigure</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-gcp-core</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
<!-- Configuration processor --> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-configuration-processor</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-gcp-config</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
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
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
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
6 changes: 6 additions & 0 deletions
6
spring-cloud-gcp-autoconfigure/src/main/resources/META-INF/spring.factories
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
org.springframework.cloud.gcp.autoconfigure.core.GcpContextAutoConfiguration | ||
|
||
org.springframework.cloud.bootstrap.BootstrapConfiguration=\ | ||
org.springframework.cloud.gcp.autoconfigure.config.GcpConfigAutoConfiguration,\ | ||
org.springframework.cloud.gcp.autoconfigure.core.GcpContextAutoConfiguration |
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>spring-cloud-gcp</artifactId> | ||
<groupId>org.springframework.cloud</groupId> | ||
<version>1.0.0.BUILD-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>spring-cloud-gcp-config</artifactId> | ||
<name>Spring Cloud GCP Runtime Configuration Module</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-context</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-gcp-core</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
57 changes: 57 additions & 0 deletions
57
...onfig/src/main/java/org/springframework/cloud/gcp/config/GcpConfigPropertiesProvider.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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright 2017 original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.cloud.gcp.config; | ||
|
||
import org.springframework.cloud.gcp.core.Credentials; | ||
|
||
/** | ||
* Provides the required properties for Spring Cloud GCP Runtime Configuration. | ||
* | ||
* @author João André Martins | ||
*/ | ||
public interface GcpConfigPropertiesProvider { | ||
|
||
/** | ||
* Determines if Spring Cloud GCP Runtime Configuration is enabled. | ||
*/ | ||
boolean isEnabled(); | ||
|
||
/** | ||
* The name of the Spring Application being run. | ||
*/ | ||
String getName(); | ||
|
||
/** | ||
* The profile running the app. For example, "prod", "dev", etc. | ||
*/ | ||
String getProfile(); | ||
|
||
/** | ||
* The timeout for reaching Google Runtime Configuration API. | ||
*/ | ||
int getTimeoutMillis(); | ||
|
||
/** | ||
* An override to the GCP project ID in the core module. | ||
*/ | ||
String getProjectId(); | ||
|
||
/** | ||
* An override to the GCP credentials in the core module. | ||
*/ | ||
Credentials getCredentials(); | ||
} |
File renamed without changes.
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
2 changes: 2 additions & 0 deletions
2
spring-cloud-gcp-config/src/main/resources/META-INF/spring.factories
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
org.springframework.cloud.bootstrap.BootstrapConfiguration=\ | ||
org.springframework.cloud.gcp.config.GoogleConfigPropertySourceLocator |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<scope>test</scope>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. Can't have commons-logging as a transitive for user apps. OTOH, if we just merge this tiny module and make it depend on Spring Boot (like it feels it should), then it's probably moot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merger of the
config
module is being discussed in #299 (comment)As per my comment, I don't think it's doable, but your input is welcome!