Skip to content

Latest commit

 

History

History
78 lines (66 loc) · 1.53 KB

README.md

File metadata and controls

78 lines (66 loc) · 1.53 KB

Spring Boot + Angular + Ant Design Archetype

Spring-Boot 2 + Angular 6 + Ant Design 脚手架

快速开始

创建项目

mvn archetype:generate -Dfilter=com.luhuiguo.archetypes:spring-angular-antd-archetype

按提示输入,即可生成项目。

运行

进入项目目录,输入

mvn spring-boot:run

即可运行,打开浏览器访问

http://localhost:8080

login

登录用户密码为 admin:admin 或 user:user

dashboard

users

如果在开发过程中,需要启用live-reload,前后端可以分别启动

mvn spring-boot:run -Dskip.npm

启动后端

cd frontend
npm start

启动前端,然后通过

http://localhost:4200

访问前端页面,这时对前端页面的修改,会自动刷新浏览器页面。 前端通过 proxy.conf.json

{
  "/api": {
    "target": "http://localhost:8080",
    "secure": false
  },
  "/actuator": {
    "target": "http://localhost:8080",
    "secure": false
  },
  "/webjars": {
    "target": "http://localhost:8080",
    "secure": false
  },
  "/v2/api-docs": {
    "target": "http://localhost:8080",
    "secure": false
  }
}

把对应后台请求转到后端

相关链接