Javascript 使用Spring boot的Vue路由器出现问题+;百里香
我正在尝试使用没有节点的Vue路由器来配合我的spring boot应用程序和Thymeleaf。出于某种原因,我得到的只是一条空话,有人知道可能发生的事情吗 我的控制器:Javascript 使用Spring boot的Vue路由器出现问题+;百里香,javascript,java,spring-boot,vue.js,thymeleaf,Javascript,Java,Spring Boot,Vue.js,Thymeleaf,我正在尝试使用没有节点的Vue路由器来配合我的spring boot应用程序和Thymeleaf。出于某种原因,我得到的只是一条空话,有人知道可能发生的事情吗 我的控制器: package com.salay.christophersalayportfolio.controllers; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMappi
package com.salay.christophersalayportfolio.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class AdminController {
@GetMapping("/")
public String dashboard(){
return "index";
}
}
我的pom.xml
4.0.0
org.springframework.boot
{{title}}
My home.html片段(用于管理My home组件)
组件
{{title}}
{{appDescription}
还有我的main.js
让homeComponent=Vue.component('Home'{
模板:“#主页”,
数据(){
返回{
标题:"家",,
appDescription:'您可以在此处为前端公文包网站添加内容。'
}
}
});
常数路由=[
{路径:'/',名称:'Home',组件:homeComponent}
]
常量路由器=新的VueRouter({
路由器:路由
})
新Vue({
el:“#应用程序”,
路由器:路由器,,
数据(){
返回{
标题:“克里斯托弗的投资组合管理员”,
导航:[
{
“物品”:“家”,
“路径”:“/”
}
]
}
}
})