Iaas
로컬에서 테스트
log의 종류
@GetMapping("/") public String home(){ log.trace("get /"); log.debug("get /"); log.info("get /"); log.warn("get /"); log.error("get /"); return "home"; }
실행을 하고 http://localhost:8080/ 확인
로그에 info, warn, error가 뜬다.
logging: level: '[com.example.aws2]': DEBUG
다시 요청을 하면
굽기
dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok:1.18.30' developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.projectlombok:lombok:1.18.30' testImplementation 'org.springframework.boot:spring-boot-starter-test' }
실행 파일이 생김
./gradlew clean build -x test // Test 없이 build
주석처리 (배포할 때 자동화 하기 위해 필요한 코드)
다시 빌드
-plain 안생기게
jar { enabled = false }
plain은 순수 자바 소스코드만 있는 파일(라이브러리가 없다)
버전을 1.1로 변경
파일이 또 생겨남
clean build를 해야 파일이 다 삭제되고 다시 빌드를 만든다.
빌드하면 파일 명이 바뀜
실행
java -jar build/libs/*.jar
http://localhost:8080/ 호출하면 실행된다.
AWS에서 실행
git —version 으로 설치 확인
메뉴판 업데이트
JDK 검색 후 설치
git clone
aws-2 로 이동 후 내용 확인
현재 실행 권한이 없다
실행 권한 부여
실행하기
Share article