Vue+SpringMVC使用History模式

2020-02-16  本文已影响0人  粑粑雷

Vue

const router = new VueRouter({

  mode: 'history',

  base: '/task',

  routes

})

SpringMVC

<mvc:resources location="/task/" mapping="/task/**" cache-period="864000"/>

web.xml

<error-page>
    <error-code>404</error-code>
    <location>/task/</location>
</error-page>

Nginx

    location / {
        error_page 404 =200 /index.html;
    }
    
    location /index.html {
        root /task;
    }
上一篇 下一篇

猜你喜欢

热点阅读