IT 한길

Step 1:

Close your IDE.

Step 2:

Download lombox jar => https://projectlombok.org/download

Step 3:

- 설치 : 다운로드 파일 더블 클릭 or java -jar lombok.jar

 

Step 4:

- SpringToolSuite4.ini 아래 내용 추가

-Xbootclasspath/a:lombok.jar
-javaagent:lombok.jar

Step 5:

- 이클립스 재시작

 

1. build.gradle 파일 수정

apply plugin: 'war' 

bootWar {
	archiveBaseName = "oauth2"
	archiveFileName = "oauth2.war"
	archiveVersion	= "0.0.0"
}

 

2. 명령어 실행

- >gradlew clean bootWar

 

3. build/libs 아래 war 파일 생성 확인. 

4. war 실행 테스트

 - java -jar oauth2.war

 - http://localhost:8080

1. Spring Boot Application 소스에 아래 내용 추가

 

2. 재기동 시 아래 로그를 확인.

  io.undertow.servlet                      : UT015020: Path /* is secured for some HTTP methods, however it is not secured for [TRACE, POST, GET, CONNECT]

 

3. 점검결과 DELETE Method  가 차단된 걸 확인할 수 있습니다.

이클립스에서 mvn spring-boot:run 실행 후 종료했는데 다시 실행이 안되는 경우 아래와 같이 설정을 바꿔주면 됩니다.

pom.xml 에서 spring-boot-maven-plugin 의 configuration안에 <fork>false</fork>추가

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <addResources>true</addResources>
                    <executable>true</executable>
                    <fork>false</fork>
                    <!--
                    Enable the line below to have remote debugging of your application on port 5005
                    -->
                    <jvmArguments>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArguments>
                     <arguments>
            			<argument>spring.profiles.active=dev</argument>
        			 </arguments>
                </configuration>
            </plugin>