maven + eclipse + tomcat : class not found exception

前端 未结 1 1301
天命终不由人
天命终不由人 2021-01-31 11:21

I have a simple web app using that uses servlets. I created it as a maven project and then imported it into eclipse ( file ->import -> existing maven projects)

The war g

1条回答
  •  无人共我
    2021-01-31 11:42

    Tomcat & Spring Web - Class Not Found Exception org.springframework.web.context.ContextLoaderListener

    Right Click on your web project in Project Explorer -> select 'Properties'. Under project properties, select 'Deployment Assembly'.

    The Deployment Assembly property page shows the content that will be published as a assembled artifact by Eclipse to the server. You need to tell Eclipse that you want all your Maven dependencies to be published too.

    To do that, click 'Add' button, then select 'Java Build Path Entries'. Click Next and select Maven Dependencies. This will publish the Maven dependency JAR files to the lib folder when Eclipse publishes your project to WST server

    0 讨论(0)
提交回复
热议问题