Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/spring config client and spring framework integration no springboot #1

Conversation

marcellodesales
Copy link
Owner

All the changes described at spring-cloud/spring-cloud-config#299 (comment).

The versions compatible are the ones indicated. Note that the Spring
Framework MUST be updated due to the incompatibility with Spring Cloud
Config ones.
Those are the 2 examples that are the foundation of adoption. The former
is the one with the RefreshScope support, while the other is for any
property.
…perties

work requires adding this class with the bean creation that enables the
resolution of properties with @value annotation. This is the key piece
of integrating exising Spring Framework apps and get the benefits for
SpringBoot (Until you make time and budget for migration :d)
So that you see your application printing which Config Server it is
connecting to.

2017-04-13 23:46:14 [main] INFO
o.s.c.c.c.ConfigServicePropertySourceLocator - Fetching config from
server at: http://localhost:8888
@marcellodesales marcellodesales merged commit 6263101 into master Apr 14, 2017
@marcellodesales marcellodesales deleted the feature/spring-config-client-and-spring-framework-integration-no-springboot branch April 14, 2017 07:26
@prasanna4
Copy link

Hi
For config server yaml file on local.

can you please provide files you kept at file:/local-development.
because when i created docker-compose.yaml using below contents from readme.
services:
configServer:
image: hyness/spring-cloud-config-server
container_name: config-server
environment:
SPRING_CLOUD_CONFIG_SERVER_NATIVE_SEARCH_LOCATIONS: classpath:/resources/config
SPRING_PROFILES_ACTIVE: native
ports:
- 8888:8888
volumes:
"config-server":

and i did started docker-compose up. it was not running. it was not picking from that location.
but when i did run this:
docker run -p 8888:8888 -e SPRING_CLOUD_CONFIG_SERVER_GIT_URI=https://github.com/prasanna4/config-repo.git hyness/spring-cloud-config-server
it loaded properties from git.

why it is happening am i doing wrong?


for spring mvc app.:
I temporarily proceeded with git but when i start client using mvn jetty:run then
All the properties defined in configClientProperties got overridden by the default properties right after the our properties are provided.
I mean even i am providing my app name but it is still taking default name as application.
??

another thing below commands are not working.

SPRING_APPLICATION_NAME=publisher SPRING_PROFILES_ACTIVE=qal SPRING_CLOUD_CONFIG_LABEL=develop mvn jetty:run
Not working in windows.

mvn jetty:run SPRING_APPLICATION_NAME=publisher SPRING_PROFILES_ACTIVE=qal SPRING_CLOUD_CONFIG_LABEL=develop
Not even this
Unknown lifecycle phase "SPRING_APPLICATION_NAME=publisher". You must specify a valid lif
ecycle phase or a goal in the format : or :<plugin-artifact
-id>[:]:. Available lifecycle phases are: validate, initialize, generate-so
urces, process-sources, generate-resources, process-resources, compile, process-classes, generate
-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compil
e, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test,
post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, pos
t-site, site-deploy. -> [Help 1]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following a
rticles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants