// 127.0.0.1:9090/ROOT/vue
@GetMapping(value = "/vue")
public String vueGet() {
// vue에서 build한 index.html파일의 위치
return "/vue/index";
}
dist안에
css, img, js, favicon.ico는 static안
index.html은 template, vue안에
주의할 점
/ROOT가 빠져서 안나옴
http://127.0.0.1:9090/ROOT/css/app.fb0c6e1c.css가 되었어야 함.
module.exports = {
// 개발 서버 설정
devServer: {
// 프록시 설정
proxy: {
// 프록시 요청을 보낼 api의 시작 부분
'/ROOT': {
// 프록시 요청을 보낼 서버의 주소
target: 'http://localhost:9090',
changeOrigin: true,
logLevel: 'debug',
}
},
},
// 리소스의 위치
publicPath : '/ROOT/vue/'
};
다시 빌드 시켜준다.
npm run build