Maven Multi Module Project Structuring Issues

后端 未结 3 2392
無奈伤痛
無奈伤痛 2021-02-20 05:31

Well here is an interesting experience i had since last couple of weeks structuring my maven multi module project.

When i decided to use maven for my build life cycle ma

3条回答
  •  北荒
    北荒 (楼主)
    2021-02-20 06:29

    I figured out the issue. Controllers are presentation-layer components. The dispatcher expects the presentation layer components in the WEB-INF/classes folder in the target rather than looking for it in the lib. I am not sure if this is valid only for maven based structuring in eclipse. So finally these are the changes i have made

    a. Created a src/main/java source folder in web-app. It is not generated by default in web-app module. b. Add packages and respective controllers in the src/main/java folder.

    So the final structure that i have (i am not pasting exact eclipse snapshot, this is generalized view)

    Final Structure

提交回复
热议问题