Spring integration - Context

Usually project has multiple spring xml files and Intellij has no way to properly assemble the context, is there any way (looks like no)  to specify the set of root xml files together with properties and than Intellij  should be able configure the context.

7 comments
Comment actions Permalink

Please define a Spring facet, there you can set up corresponding contexts of configuration files (XML, Java, .properties) which belong together.


0
Comment actions Permalink

Spring Facet requires to list all the XMLs files and properties, it would be nice if it is possible to define only the root set of XMLs and the rest should be derived by Intellij

Thanks

0
Comment actions Permalink

If there's a common general pattern which should be supported automatically, then please file a feature request.

The current solution offers maximum flexibility w/r to project setup/structure.

0
Comment actions Permalink

I would assume that giving root set of xml files and properties should be sufficient to construct the context internally by IntelliJ, this actually what developer does. In a big corporate project usually there are a lot of unused junk env, test specific XMLs floating around that shouldn't be considered at all.

Thanks.

0
Comment actions Permalink

Could you give a specific example?

0
Comment actions Permalink

Given context.xml and global.properties the context should include everything in bold below and exclude everything whish is not bold (context.xml, services.xml, services1.xml,  services2.xml)

Given contextTest.xml and localDev.properties the context should include ( servicesMock.xml, and ignore the rest) additionally would be nice to be able to switch active context similar to change list, just consider that in my current project there are  have more 60 xml files, and 20-30 properties files, ALT+F7 look up property in each and every property file in the project path, not to mention that projects has multiple modules etc.


context.xml - want (refers to services.xml) - Root
services.xml - want (refers to services1.xml,  services2.xml)
servicesMock.xml - want
contextTest.xml - don't want (refers to servicesMock.xml)
context1.xml - want
context2.xml - want
contextUAT.xml - don't want
global.properties - want
localDev.properties - don't want
localUAT.properties - don't want


Actually there is similar problem with MVN integration as well when working with multiple modules, all dependencies from all the projects in the classpath.


Thanks

Attachment(s):
propertylookup.PNG
0
Comment actions Permalink

You should be able to define different contexts (with their corresponding .properties files) and switch betweem them (there's a context switcher panel on top of every spring.xml file in 12.1).

I don't see how we could automate the setup you're using in your project, also it's not a "standard" setup suggested or implied for other users of Spring Framework.

0

Please sign in to leave a comment.