• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Confused about where to put JMSConfig and other config for a Spring Boot application

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a little confused about the appropriate way to break up my Spring application. Currently, I have it set up like this:


src/main/java/com.company.registration
--Application.java
--config
----JMSConfig.java
--services
----SubscriptionListener.java

I have other folders (model, dao, etc.) but this is sufficient to illustrate my confusion... Currently, I have an @EnableJms tag in the JMSConfig file, as well as the appropriate configuration and setup. I also have a class annotated with @JmsListener in the SubscriptionListener.java file. If I run the application with this setup, the Listener is not picked up, and therefore, doesn't listen. However, if I move the JMSConfig file under the services folder, it recognizes my listener and configures it correctly. I was under the impression it was important to separate out the config classes, but I can't seem to get it work unless I drop it in the same sub-folder. Is there something I'm doing wrong or missing about how Spring connects the dots? Do they not work across sub-folders? Is there a way I can get it to work, and if not, what is the appropriate way to do this?

Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic