기본 콘텐츠로 건너뛰기

Eclipse에서 작성한 프로젝트를 운영서버에 배포하기

이클립스에서 작성한 프로젝트를 운영서버에서 배포하기
- Eclipse는 개발환경, 개발 후 실행환경에 배포하는 절차가 요구됨
- 실행환경 : Tomcat, 없는 경우

- JAR 파일로 패키징 : Web App이 아닌 경우, Tomcat 이 내장된 Web App인 경우
    java -jar 파일이름.jar<enter>

- WAR 파일로 패키징 : Web Application Archives, Tomcat의 webapp/ 안에 복사
    <packaging>war</packaging>

Project -> Run As -> Maven clean(전에 했던 빌드를 지운다) -> .../target/(파일 생기는 곳) -> Maven install -> JAR / WAR tartget/(파일 생성)

무료 웹서버 계정을 주는 곳
- oracle cloud 서비스
- 100G, Linux, ...
- Oracle, MySQL, ...

유료 휍호스팅은 어디가 쌀까?
- cafe24.com
- gabia.com

Developer Tools
    Spring Boot DevTools
    Lombok
Web
    Spring Web

cd my-app
npm start<enter>
개발 완료시 빌드
npm run build<enter>
- my-app/build // 이 안에 빌드 파일이 들어간다

빌드된 파일을 모두 복사하여 Spring 프로젝트의 static/ 안에 복사해서 붙이기

application.properties
spring.mvc.view.prefix=/ // static/ 경로이다
spring.mvc.view.suffix=.html // .html을 생략가능

이 블로그의 인기 게시물

Python Sklearn make_regression

from sklearn.datasets import make_regression import matplotlib.pyplot as plt X, y = make_regression(n_samples=250, n_features=1, noise=50, random_state=2) plt.scatter(X,y, s=2) plt.show() from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split # 한글 깨짐 없이 나오게 설정 from matplotlib import rcParams # 인코딩 폰트 설정 rcParams['font.family'] = 'New Gulim' rcParams['font.size'] = 10 x_train, x_test, y_train, y_test = train_test_split(X,y, test_size=.20, random_state=0) x_train.shape, x_test.shape, y_train.shape, y_test.shape # 모델 생성 model = LinearRegression() # 학습하기 model.fit(x_train, y_train) # 가중치, 편향치 구하기 model.coef_, model.intercept_ # (array([90.11061494]), 2.4224269924448585) # 결정 계수 model.score(x_train, y_train) # 0.789267454050733 # 추정 pred = model.predict(x_test) # 산점도 plt.scatter(x_test,y_test) plt.plot(x_test, pred, 'r-') plt.show() # 추정 model.predict([[3.0]]) # 학습할 때 주는 데이터의 형식을 따른다 # x의 최소값, 최대값을 계수와 절편을 사용하여 ...

Javascript on 함수

엔터키 감지하기 <input type="password" onkeypress="func(event)" /> function func(event) {      if(event.keyCode == 13) { // keyCode 13은 엔터이다           alert("엔터를 입력했습니다.");     }     if (event.tartget.value == 13) {          alert("엔터를 입력했습니다.");     } }

Grid 정렬

  .container { display : grid ; gap : 22px ; width : 1000px ; grid-template-columns : repeat ( auto-fit , 150px ); margin : auto ; justify-content : center ; } .container {      display : grid ; gap : 22px ; grid-template-columns : repeat ( auto-fit , minmax ( 250px , 1fr )); }