1. 程式人生 > 實用技巧 >docker技術快速實現前後端專案的叢集化②renren-fast後端java環境在eclipse中windows環境的搭建

docker技術快速實現前後端專案的叢集化②renren-fast後端java環境在eclipse中windows環境的搭建

docker技術快速實現前後端專案的叢集化②renren-fast後端環境在eclipse中windows環境的搭建

使用renren-fast作為演示,下載原始碼,並且eclipse匯入

https://www.renren.io/community/project

下載2.0版本

https://gitee.com/renrenio/renren-fast/tree/v2.0.0/

專案參考文件

https://www.renren.io/guide/#end

匯入已經存在的maven專案

建立資料庫,匯入sql表

修改spring-dev.xml檔案中的資料庫連線

安裝run as spring boot app工具

import com.google.gson.Gson; 飄紅問題解決

引入gson這個包依賴

<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.6</
version> </dependency>

Run as clean

Run as install

Run as springboot app

訪問介面文件

http://localhost:8080/renren-fast/swagger/index.html

使用swagger進行介面測試

至此java後端專案在windows中能正常跑起來了