上篇文章我们讲解了使用SpringBoot整合Angular的时候的基础环境的配置,我们这篇文章主要讲解让Angular去和SpringBoot进行整合操作.
- 修改pom文件为以下内容
复制代码 4.0.0 com.edurt springboot-angular-integration jar 1.0.0 springboot-angular-integration http://maven.apache.org 1.8 v8.2.1 5.4.2 1.5.6.RELEASE 1.5.9.RELEASE 0.0.27 org.springframework.boot spring-boot-starter-web ${dependency.springboot.version} junit junit 3.8.1 test org.springframework.boot spring-boot-maven-plugin ${plugin.springboot.version} true com.github.eirslett frontend-maven-plugin ${plugin.frontend.version} src/main/angular https://npm.taobao.org/mirrors/node/ ${system.node.version} ${system.npm.version} target install node and npm install-node-and-npm generate-resources npm install npm install target angular cli build npm generate-resources run build
- 修改.angular-cli.json文件编译输出配置
"outDir": "../resources/static",复制代码