Javascript Spring MVC jsp页面中的Vue.js出现问题

Javascript Spring MVC jsp页面中的Vue.js出现问题,javascript,spring,spring-mvc,jsp,vue.js,Javascript,Spring,Spring Mvc,Jsp,Vue.js,我正在尝试向jsp文件添加视图,我正在使用cdn向我的SpringMVC应用程序添加视图。我有一个非常基本的设置,无论出于什么原因,我在数据对象上添加的msg属性只显示为{{msg}},而不是实际的消息 header.jsp: <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charse

我正在尝试向jsp文件添加视图,我正在使用cdn向我的SpringMVC应用程序添加视图。我有一个非常基本的设置,无论出于什么原因,我在数据对象上添加的msg属性只显示为{{msg}},而不是实际的消息

header.jsp:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Insert title here</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
        <link  href="./css/main.css" rel="stylesheet"/>
        <!-- development version, includes helpful console warnings -->
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <script src="./js/main.js"></script>
    </head>
    <body> 
        <div id="app">
            <div class="container">

这一切都是作为SpringMVC应用程序的一部分完成的。我一直在网上寻找解决方案,但似乎没有。。。。或者这种情况不适用于我。我使用的是ApacheTomcat版本9,以防服务器与之相关。

问题是引用我的外部JavaScript文件的脚本标记应该放在文档的底部。更具体地说,就在主体的结束标记()之前。不知怎么的,它改变了

<%@include file = "header.jsp" %>
    <div class="jumbotron">
        <h1>This is an example</h1>
        {{ msg }}
    </div>
        <a href="./reviews">reviews</a>
        <a href="./hotel_requests">hotel requests</a>
<%@include file = "footer.jsp" %>
            </div>  
        </div>
    </body>
</html>
let app = new Vue({
    el:'#app',
    data:{
        msg:'Hello Vue!'
    }
})