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

How to use application.yml ! #8777

Closed
dingwenxiang0 opened this issue Mar 30, 2017 · 3 comments
Closed

How to use application.yml ! #8777

dingwenxiang0 opened this issue Mar 30, 2017 · 3 comments
Labels
for: stackoverflow A question that's better suited to stackoverflow.com

Comments

@dingwenxiang0
Copy link

I am learning spring boot.
I following spring-boot-sample-activemq.
When i use application.properties configs. The application run success and well.
but when i switch to application.yml. then i cant start my application.
All code like spring-boot-sample-activemq. just change properties to yml.

the error tell me:

Field jmsMessagingTemplate in sample.activemq.provider.Provider required a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' that could not be found.
	- Bean method 'jmsMessagingTemplate' not loaded because Ancestor org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration did not match


Action:

Consider revisiting the conditions above or defining a bean of type 'org.springframework.jms.core.JmsMessagingTemplate' in your configuration.

I tried to read the yml property. that is success.
and i check the error. i found maybe yml dont support Autowried.

next it is my yml config(application.yml in src/main/resources/config ):
spring: activemq: in-memory: true broker-url: tcp://192.168.2.174:61616 pool: enabled: true my: queue: FirstQueue

OK. done. plz help me . thank you and good day

@snicoll
Copy link
Member

snicoll commented Mar 30, 2017

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

@snicoll snicoll closed this as completed Mar 30, 2017
@snicoll snicoll added the for: stackoverflow A question that's better suited to stackoverflow.com label Mar 30, 2017
@dingwenxiang0
Copy link
Author

.... you are so fast!

@dingwenxiang0
Copy link
Author

It is my mistake, I set spring.activemq.pool.enabled=true.
and i dont set PooledConnectionFactory.
thank you snicoll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com
Projects
None yet
Development

No branches or pull requests

2 participants