vue專案整合到springboot方法

2021-09-25 01:41:27 字數 502 閱讀 8944

其實方法很簡單的,比直接放到tomacat時需要改動assetspublicpath還簡單。。。

直接打包,把dist目錄下內容全部拷貝到springboot工程目錄下的main\resources\static目錄下

我這裡是thymeleaf,使用的是templates下的模板

@controller

public class pagecontroller

}

跳轉到了templates下的index.html

所以我們在該index.html下用**跳轉到static下的index.html

行了,啟動springboot專案,然後瀏覽器輸入:

自動跳轉為:index.html#/

效果就出來了

springboot專案整合vue

由於特殊原因,所以臨危受命將vue整合到springboot的專案中,終於在忙活了一天之後成功搞定,下面就分享一下這次的整合過程 1建立springboot和vue專案 springboot以及vue專案都已經由前後端同事分別開發完成,這裡就不介紹具體的建立過程了 2.打包vue專案 vue使用了v...

ReactNative整合到原生專案

reactnative整合到原生專案 1 在工程裡建立乙個reactcomponent資料夾,用來存放reactnative相關的檔案 2 reactcomponent資料夾裡,存放以下檔案 3 其中package.json檔案是關於reactnative的配置資訊,最好自己init乙個專案然後將專...

vue打包整合到springboot中

1.修改vuejs的config index.js,在裡面找到assetspublicpath,改為 記住,是build 這裡的,不是上面dev 的 build template for index.html index path.resolve dirname,dist index.html pa...