我的第一个springmvc helloword

用idea创建springmvc项目不同于用eclipse创建需要自己创建xml文件,只需要用它自己的就行,不然可能会有未知的错误

两个xml文件区别:

applicationContext.xml  是spring 全局配置文件,用来控制spring 特性的

dispatcher-servlet.xml 是spring mvc里面的,控制器、拦截uri转发view

使用applicationContext.xml文件时是需要在web.xml中添加listener的:

猜你喜欢

转载自blog.csdn.net/qq_41262903/article/details/84545961