ng2 통합 spring boot 배경 (1)
첫 번 째 로 Spring Boot 프로젝트 를 만 듭 니 다.
... 에 있다https://start.spring.io/REST 서 비 스 를 제공 하기 위해 배경 에 있 는 Spring Boot 프로그램 을 만 듭 니 다.
2 단계 분리 전 백 스테이지 모듈
앞 뒤 단 을 대응 하 는 서로 다른 maven 모듈 로 나 눕 니 다.
frontend\src\main
4.0.0
com.jdriven.ng2boot
parent
0.0.1-SNAPSHOT
pom
parent
The ng2boot parent project
org.springframework.boot
spring-boot-starter-parent
1.5.2.RELEASE
UTF-8
UTF-8
1.8
frontend
backend
4.0.0
backend
backend
The ng2boot backend project
com.jdriven.ng2boot
parent
0.0.1-SNAPSHOT
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-maven-plugin
4.0.0
frontend
frontend
The ng2boot frontend project
com.jdriven.ng2boot
parent
0.0.1-SNAPSHOT
세 번 째 단계 ng2 프로그램 을 전단 에 추가 하 는 main 경로
명령 실행:
ng new --skip-git --directory frontend ng2boot
프로젝트 경 로 를 실행 하 는 것 은 현재 경로 의 frontend 경로 에서 ng2boot 라 는 프로젝트 를 만 드 는 것 입 니 다. (이 이름 은 경로 에 나타 나 지 않 습 니 다)메모: git 디 렉 터 리 를 만 들 지 마 십시오. 전체적으로 Maven 프로젝트 이기 때문에 나중에 큰 프로젝트 에 따라 git 를 제출 할 것 입 니 다.STEP 4: maven 을 설정 하여 ng2 프로젝트 를 빌 드 합 니 다.
frontend - maven - plugin 플러그 인 을 사용 하여 ng2 프로그램 을 컴 파일 합 니 다.
com.github.eirslett
frontend-maven-plugin
1.3
v6.10.1 o
4.4.1
src/main/frontend
install node and npm
install-node-and-npm
npm install
npm
npm run build
npm
run build
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.