使用Wildfly提供静态内容(单页面应用程序)

时间:2017-02-08 09:27:03

标签: wildfly single-page-application wildfly-10 undertow

我需要使用Wildfly应用程序服务器提供WAR之外的静态内容。 我设置了

   <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
   </host>
    <handlers>
                <file name="welcome-content" path="c:/Users/admin/web" directory-listing="true"/>
            </handlers>

一切正常但我遇到了路由问题。 该应用程序具有html5历史记录支持。 当我去网址时:localhost:8080一切正常,我的应用程序重定向到/ home 但是当我刷新页面时,它会返回404错误。

是否可以将位置名称定义为通配符,例如/ *  或者如何通过单页面应用程序解决问题?

0 个答案:

没有答案