Maven dependency for whole org.springframework

前端 未结 8 1867
滥情空心
滥情空心 2020-12-28 09:50

How to set Maven dependency for all org.springframework ?

I mean, how to do it in couple lines,instead of providing dependency for every module,e.g.:

8条回答
  •  一生所求
    2020-12-28 10:22

    There is no way, and there should be none. You should only use the jars you really need, no need for all spring jars. For 2.x there used to be a spring.jar but in every project I've seen that used, it caused version collision problems.

    If you are using any subprojects from Spring, watch it that sometimes they still pull Spring 2.5 (e.g. Spring Batch and I think Spring Web Flow as well), in this case you should use the exclusions tag in your pom.xml.

    Not the most convenient to assemble it the first time, but then you can reuse it in your other projects.

提交回复
热议问题