就是每次在Controller里面新写了方法,或者修改了配置文件,都要maven clean 然后 maven install 之后才能用,不这样的话发起请求就会报404错误。报错:
Type Status Report
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
截图:想知道是什么原因?有没有什么简单的解决方法,每次都clean install 太繁琐了。

解决方案 »

  1.   

    install?你项目是springboot的web项目吗?能上个项目idea图吗
      

  2.   


    是SSM项目,用maven管理,分多模块
      

  3.   

    这是少不了的步骤吧,
    你多个项目相互依赖,项目新增了方法,那么你肯定要先install到本地maven私库中,供其他项目使用吧(我是这样认为的)
      

  4.   


    是SSM项目,用maven管理,分多模块
    你的controller是在2-component下吗,  你把你maven repo中的 jar包删了,再试试, 可能是maven repo中有这个jar包
    ,然后他不知道是用你的项目还是用 maven中的jar了
      

  5.   


    是SSM项目,用maven管理,分多模块
    你的controller是在2-component下吗,  你把你maven repo中的 jar包删了,再试试, 可能是maven repo中有这个jar包
    ,然后他不知道是用你的项目还是用 maven中的jar了controller是在2-component里面,我换了新的maven仓库重新下载jar包后还是一样的。
      

  6.   


    是SSM项目,用maven管理,分多模块
    你的controller是在2-component下吗,  你把你maven repo中的 jar包删了,再试试, 可能是maven repo中有这个jar包
    ,然后他不知道是用你的项目还是用 maven中的jar了controller是在2-component里面,我换了新的maven仓库重新下载jar包后还是一样的。
    我建了一个跟你差不多的例子,上传到github上了, 你可以试试在你那是不是有同样的问题
    建个test4方法, 然后复制个test4.jsp
      

  7.   

    https://github.com/huanqingdong/spring-mvc-demo.git
      

  8.   


    是SSM项目,用maven管理,分多模块
    你的controller是在2-component下吗,  你把你maven repo中的 jar包删了,再试试, 可能是maven repo中有这个jar包
    ,然后他不知道是用你的项目还是用 maven中的jar了controller是在2-component里面,我换了新的maven仓库重新下载jar包后还是一样的。
    我建了一个跟你差不多的例子,上传到github上了, 你可以试试在你那是不是有同样的问题
    建个test4方法, 然后复制个test4.jsp
    测试了,还是一样的问题,重启服务器没用,必需要maven clean再install之后才能生效。
    请问您知道原因和具体的解决方案吗?