java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener in eclipse

前端 未结 5 1302
暖寄归人
暖寄归人 2020-12-09 20:04

I am doing a simple Spring MVC application(not using maven) which will print hello world on browser. It is a dynamic project in eclipse, so I put all the required jar files

5条回答
  •  渐次进展
    2020-12-09 20:29

    I have a VERY GOOD WAY to help you learn Spring MVC if you have Maven up and running.

    IF SO: go to your command line (Cygwin) I use...

    mvn archetype:generate It will ask for an 'archetype number'. For you... type 16 Enter the group ID which is just the main package. Enter Artifact ID which is your project name. SNAP-SHOT --- just press enter and same with version. Package - is the same as your group ID name. EX: com.spring Confirm it by entering the letter 'y' and press enter. DO all of the above after your are in your workspace directory. That way it is created there. You can do "mvn eclipse:eclipse" to load it in Eclipse OR you can just import it. I prefer the old fashioned importing an existing project.

    Everything will be 'already' set up for you in terms of ALL configuration (Java-Based) which is good for you. It will have all the Maven dependencies you need as well already in your pom.xml. You can add or take from it if you want.

    The point here is that you will have a running project already and you can play with it from there. I create all my projects like this at first and erase what I don't need and add what I do and then go from there.

    Good luck!!!

提交回复
热议问题