鍍金池/ 問答/Java  網(wǎng)絡(luò)安全  HTML/ spring boot thymeleaf 如何整合 webpack + vue

spring boot thymeleaf 如何整合 webpack + vue

如題,我想要把vue + webpack 融合到 thymeleaf中,具體的做法是在controller層訪問vue文件夾下的index.html,index.html是vue的入口文件。
這樣如果直接訪問springboot發(fā)布端口,是無法訪問vue服務(wù)的,index.html訪問是空;我目前打算先發(fā)布vue服務(wù),自己在index.html手動(dòng)引入vue編譯好的app.js 文件;

請(qǐng)問,我怎樣才能在springboot的發(fā)布端口直接就訪問vue的服務(wù)呢?

回答
編輯回答
司令

頁面用vue做好后,就build一下生成靜態(tài)的資源,index.html直接引入build好的資源,我們的項(xiàng)目前后端徹底分離,頁面用vue寫好,build好直接發(fā)布,然后調(diào)用springboot寫好的接口

2017年5月2日 17:26