开发者

How to separate spring contexts in intelliJ IDEA

开发者_C百科

I have a problem configuring IntelliJ IDEA for developing spring and maven powered application.

App has two separate spring configurations for production and test purposes. In spring facet props in IDEA I created two different file sets but when configuring one of contexts IDEA shows variants for both ones in code completion. How can I deal with this?

Thanks

Aleksander


The only option is to create two different filesets of spring config. If the beans are defined in both the filesets, it would links the beans to both filesets. Obviously I don't think it (or any IDE) is capable of resolving if it has to use main/test filesets based on your code path. Hope they would enhance the sprint context(fileset) resolution based on the code path (source/test). But it would be difficult for the IDE as the main business logic falls in both main/test context during the flow.


IDEA 2016.2 has checkbox: Check test files:

How to separate spring contexts in intelliJ IDEA

After check on IDEA stop complain, that test files not included in Spring Facet. Try to play with it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜