<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>기록만이살길</title>
    <link>https://recordsoflife.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Wed, 8 Apr 2026 10:55:48 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>기록만이살길</managingEditor>
    <item>
      <title>두 개의 JSON 개체를 Jackson과 비교</title>
      <link>https://recordsoflife.tistory.com/1486</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-overview&quot; data-id=&quot;overview&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;overview&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 예제에서는 Java용 JSON 처리 라이브러리인 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/jackson&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jackson을&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 두 개의 JSON 개체를 비교하는 방법을 살펴보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-maven&quot; data-id=&quot;maven&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. 메이븐 의존성&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#maven&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;maven&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;a href=&quot;https://search.maven.org/classic/#search%7Cga%7C1%7Cg%3A%22com.fasterxml.jackson.core%22%20AND%20a%3A%22jackson-databind%22&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 jackson-databind&lt;/font&gt;&lt;/a&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Maven 의존성을 추가해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt; &lt;a href=&quot;https://search.maven.org/classic/#search%7Cga%7C1%7Cg%3A%22com.fasterxml.jackson.core%22%20AND%20a%3A%22jackson-databind%22&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt; &lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;com.fasterxml.jackson.core&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;jackson-databind&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;2.13.3&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-jackson&quot; data-id=&quot;jackson&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. Jackson을 사용하여 두 개의 JSON 개체 비교&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#jackson&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;jackson&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/com/fasterxml/jackson/databind/ObjectMapper.html&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ObjectMapper&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 클래스를 사용하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;객체를 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;a href=&quot;https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/com/fasterxml/jackson/databind/JsonNode.html&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 읽습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ObjectMapper를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 만들어 봅시다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-type&quot;&gt;ObjectMapper&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;mapper&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ObjectMapper&lt;/span&gt;();&lt;/code&gt;&lt;/pre&gt; 
 &lt;h3 id=&quot;bd-1-compare-two-simple-json-objects&quot; data-id=&quot;1-compare-two-simple-json-objects&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 개의 간단한 JSON 개체 비교&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-compare-two-simple-json-objects&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-compare-two-simple-json-objects&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/com/fasterxml/jackson/databind/JsonNode.html#equals-java.lang.Object-&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode.equals&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메서드를 사용하여 시작하겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;equals &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;()&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메서드는 전체(심층) 비교를 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;COePxvWP8v0CFRBbvQod03EFjw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변수 로 정의된 JSON 문자열이 있다고 가정합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;employee&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;1212&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;fullName&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;John Miles&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;34&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그리고 이를 다른 JSON인 s2&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 비교하려고 합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{   
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;employee&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;1212&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;34&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;fullName&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;John Miles&quot;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력 JSON을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 읽고 비교해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;assertEquals(mapper.readTree(s1), mapper.readTree(s2));&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력 JSON 변수 s1&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 속성 순서가 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;동일하지 않더라도 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;equals()&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메서드는 순서를 무시하고 동일한 것으로 취급한다는&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 점에 유의해야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-compare-two-json-objects-with-a-nested-element&quot; data-id=&quot;2-compare-two-json-objects-with-a-nested-element&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 개의 JSON 개체를 중첩 요소와 비교&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-compare-two-json-objects-with-a-nested-element&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-compare-two-json-objects-with-a-nested-element&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음으로 중첩 요소가 있는 두 JSON 개체를 비교하는 방법을 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;COiPxvWP8v0CFRBbvQod03EFjw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변수 로 정의된 JSON부터 시작하겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{ 
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;employee&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;1212&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;fullName&quot;&lt;/span&gt;:&lt;span class=&quot;hljs-string&quot;&gt;&quot;John Miles&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;34&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;contact&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            &lt;span class=&quot;hljs-string&quot;&gt;&quot;email&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;john@xyz.com&quot;&lt;/span&gt;,
            &lt;span class=&quot;hljs-string&quot;&gt;&quot;phone&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;9999999999&quot;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;보시다시피 JSON에는 중첩된 요소인 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;contact 이&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 포함되어 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 정의된 다른 JSON과 비교하려고 합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;employee&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;1212&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;34&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;fullName&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;John Miles&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;contact&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            &lt;span class=&quot;hljs-string&quot;&gt;&quot;email&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;john@xyz.com&quot;&lt;/span&gt;,
            &lt;span class=&quot;hljs-string&quot;&gt;&quot;phone&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;9999999999&quot;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력 JSON을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 읽고 비교해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;assertEquals(mapper.readTree(s1), mapper.readTree(s2));
&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다시 말하지만 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;equals()는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 두 개의 입력 JSON 개체를 중첩된 요소와 비교할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;COmPxvWP8v0CFRBbvQod03EFjw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;h3 id=&quot;bd-3-compare-two-json-objects-containing-a-list-element&quot; data-id=&quot;3-compare-two-json-objects-containing-a-list-element&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.3. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;List 요소를 포함하는 두 개의 JSON 개체 비교&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#3-compare-two-json-objects-containing-a-list-element&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;3-compare-two-json-objects-containing-a-list-element&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마찬가지로 List 요소를 포함하는 두 개의 JSON 개체를 비교할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 정의된 이 JSON을 살펴보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-json hljs&quot;&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;hljs-attr&quot;&gt;&quot;employee&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;1212&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;fullName&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;John Miles&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;age&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;34&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;hljs-attr&quot;&gt;&quot;skills&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;hljs-punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hljs-string&quot;&gt;&quot;Java&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;C++&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;Python&quot;&lt;/span&gt;&lt;span class=&quot;hljs-punctuation&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;hljs-punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 JSON인 s2&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 비교하고 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;employee&quot;&lt;/span&gt;:&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;1212&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;34&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;fullName&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;John Miles&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;skills&quot;&lt;/span&gt;: [&lt;span class=&quot;hljs-string&quot;&gt;&quot;Java&quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&quot;C++&quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&quot;Python&quot;&lt;/span&gt;] &lt;font&gt;&lt;/font&gt;
    } &lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력 JSON을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 읽고 비교해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;assertEquals(mapper.readTree(s1), mapper.readTree(s2));&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 개의 List 요소가 동일한 순서로 동일한 값을 갖는 경우에만 동일한 것으로 비교된다는 점을&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 아는 것이 중요합니다 .&lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-custom&quot; data-id=&quot;custom&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 두 개의 JSON 개체를 사용자 지정 비교기와 비교&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#custom&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;custom&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;a href=&quot;https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/com/fasterxml/jackson/databind/JsonNode.html#equals-java.lang.Object-&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode.equals는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 대부분의 경우 잘 작동합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jackson은 또한&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.8/com/fasterxml/jackson/databind/JsonNode.html#equals-java.util.Comparator-com.fasterxml.jackson.databind.JsonNode-&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; JsonNode.equals(comparator, JsonNode)를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 제공하여 사용자 정의 Java Comparator&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 개체를 구성합니다&lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 정의 Comparator 를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하는 방법을 이해해 봅시다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-custom-comparator-to-compare-numeric-values&quot; data-id=&quot;1-custom-comparator-to-compare-numeric-values&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;숫자 값을 비교하기 위한 사용자 지정 비교기&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-custom-comparator-to-compare-numeric-values&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-custom-comparator-to-compare-numeric-values&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 지정 Comparator를&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 숫자 값이 있는 두 JSON 요소를 비교하는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;방법을 살펴보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-5&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_1&quot; name=&quot;baeldung_incontent_1&quot; data-google-query-id=&quot;COqPxvWP8v0CFRBbvQod03EFjw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 JSON을 입력 s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 사용합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;John&quot;&lt;/span&gt;,
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;score&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;5.0&lt;/span&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 정의된 다른 JSON과 비교해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;John&quot;&lt;/span&gt;,
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;score&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;5&lt;/span&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s1&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 속성 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;점수&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 값이 동일하지 않다는&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 것을 관찰해야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력 JSON을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 읽고 비교해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-type&quot;&gt;JsonNode&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;actualObj1&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mapper.readTree(s1);
&lt;span class=&quot;hljs-type&quot;&gt;JsonNode&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;actualObj2&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mapper.readTree(s2);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
assertNotEquals(actualObj1, actualObj2);&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 개체가 같지 않음에 유의하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;표준 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;equals()&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메서드는 값 5.0과 5를 다른 것으로 간주합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 정의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비교기를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 값 5와 5.0을 비교하고 동일하게 취급할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 두 개의 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;NumericNode&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 개체를 비교하기 위해 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Comparator를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 생성해 보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;NumericNodeComparator&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Comparator&lt;/span&gt;&amp;lt;JsonNode&amp;gt; &lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-type&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;compare&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;(JsonNode o1, JsonNode o2)&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-keyword&quot;&gt;if&lt;/span&gt; (o1.equals(o2)){
           &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;0&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-keyword&quot;&gt;if&lt;/span&gt; ((o1 &lt;span class=&quot;hljs-keyword&quot;&gt;instanceof&lt;/span&gt; NumericNode) &amp;amp;&amp;amp; (o2 &lt;span class=&quot;hljs-keyword&quot;&gt;instanceof&lt;/span&gt; NumericNode)){
            &lt;span class=&quot;hljs-type&quot;&gt;Double&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;d1&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; ((NumericNode) o1).asDouble();
            &lt;span class=&quot;hljs-type&quot;&gt;Double&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;d2&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; ((NumericNode) o2).asDouble(); 
            &lt;span class=&quot;hljs-keyword&quot;&gt;if&lt;/span&gt; (d1.compareTo(d2) == &lt;span class=&quot;hljs-number&quot;&gt;0&lt;/span&gt;) {
               &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;0&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;1&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음으로 이 비교기를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하는 방법을 살펴보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-6&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_2&quot; name=&quot;baeldung_incontent_2&quot; data-google-query-id=&quot;COuPxvWP8v0CFRBbvQod03EFjw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-type&quot;&gt;NumericNodeComparator&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;cmp&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;NumericNodeComparator&lt;/span&gt;();&lt;font&gt;&lt;/font&gt;
assertTrue(actualObj1.equals(cmp, actualObj2));&lt;/code&gt;&lt;/pre&gt; 
 &lt;h3 id=&quot;bd-2-custom-comparator-to-compare-text-values&quot; data-id=&quot;2-custom-comparator-to-compare-text-values&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;텍스트 값을 비교하기 위한 사용자 지정 비교기&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-custom-comparator-to-compare-text-values&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-custom-comparator-to-compare-text-values&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 JSON 값의 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대/소문자를 구분하지 않는 비교를 위한 사용자 지정 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Comparator&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 또 다른 예를&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 살펴보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 JSON을 입력 s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 사용합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;john&quot;&lt;/span&gt;, 
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;score&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;5&lt;/span&gt; 
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 정의된 다른 JSON과 비교해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{ 
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;JOHN&quot;&lt;/span&gt;, 
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;score&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-number&quot;&gt;5&lt;/span&gt; 
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;보시다시피 속성 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이름은 입력 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 소문자 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 대문자입니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 두 개의 TextNode&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 개체를 비교하기 위해 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Comparator를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 만들어 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;TextNodeComparator&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Comparator&lt;/span&gt;&amp;lt;JsonNode&amp;gt; &lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-type&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;compare&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;(JsonNode o1, JsonNode o2)&lt;/span&gt; {
        &lt;span class=&quot;hljs-keyword&quot;&gt;if&lt;/span&gt; (o1.equals(o2)) {
            &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;0&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-keyword&quot;&gt;if&lt;/span&gt; ((o1 &lt;span class=&quot;hljs-keyword&quot;&gt;instanceof&lt;/span&gt; TextNode) &amp;amp;&amp;amp; (o2 &lt;span class=&quot;hljs-keyword&quot;&gt;instanceof&lt;/span&gt; TextNode)) {
            &lt;span class=&quot;hljs-type&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;s1&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; ((TextNode) o1).asText();
            &lt;span class=&quot;hljs-type&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;s2&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; ((TextNode) o2).asText();
            &lt;span class=&quot;hljs-keyword&quot;&gt;if&lt;/span&gt; (s1.equalsIgnoreCase(s2)) {
                &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;0&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot;&gt;1&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;TextNodeComparator를&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s1&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;s2를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 비교하는 방법을 살펴보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-type&quot;&gt;JsonNode&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;actualObj1&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mapper.readTree(s1);
&lt;span class=&quot;hljs-type&quot;&gt;JsonNode&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;actualObj2&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mapper.readTree(s2);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;span class=&quot;hljs-type&quot;&gt;TextNodeComparator&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;cmp&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;TextNodeComparator&lt;/span&gt;();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
assertNotEquals(actualObj1, actualObj2);&lt;font&gt;&lt;/font&gt;
assertTrue(actualObj1.equals(cmp, actualObj2));&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로, 입력 JSON 요소 값이 정확히 동일하지 않지만 여전히 동일한 것으로 취급하려는 경우&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 두 JSON 개체를 비교하는 동안 사용자 지정 비교기 개체를 사용하는 것을 볼 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 빠른 기사에서는 Jackson을 사용하여 두 개의 JSON 객체를 비교하고 사용자 정의 비교기를 사용하는 방법을 살펴보았습니다 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-7&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_3&quot; name=&quot;baeldung_incontent_3&quot; data-google-query-id=&quot;COyPxvWP8v0CFRBbvQod03EFjw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;항상 그렇듯이 여기에서 논의된 모든 예제의 전체 소스 코드는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/eugenp/tutorials/tree/master/jackson-modules/jackson-core&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GitHub 에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 찾을 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – Jackson (eBook) (cat=Jackson)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner footer-jackson-banner&quot;&gt; 
    &lt;img class=&quot;&quot; src=&quot;wp-content/uploads/2016/05/baeldung-jackson-post-footer-main-1.2.0.jpg&quot; alt=&quot;Jackson으로 올바른 JSON 수행 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img src=&quot;wp-content/uploads/2016/05/baeldung-jackson-lightbox-icn-1_kraken.png&quot; alt=&quot;Jackson으로 올바른 JSON 수행 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div class=&quot;bigger&quot;&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jackson과 함께 JSON을 올바르게 수행&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/do-json-with-jackson-ebook&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/jackson-compare-two-json-objects&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1486</guid>
      <comments>https://recordsoflife.tistory.com/1486#entry1486comment</comments>
      <pubDate>Thu, 23 Mar 2023 22:15:24 +0900</pubDate>
    </item>
    <item>
      <title>Jackson으로 중첩 값 매핑</title>
      <link>https://recordsoflife.tistory.com/1485</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-overview&quot; data-id=&quot;overview&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;overview&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JSON으로 작업할 때의 일반적인 사용 사례는 한 모델에서 다른 모델로 변환을 수행하는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 복잡하고 조밀하게 중첩된 개체 그래프를 다른 도메인에서 사용하기 위해 보다 간단한 모델로 구문 분석할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/FasterXML/jackson&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 빠른 사용방법(예제)에서는 중첩된 값을 Jackson&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 매핑하여 복잡한 데이터 구조를 평면화하는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;방법을&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/FasterXML/jackson&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt; &lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 살펴보겠습니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 세 가지 방법으로 JSON을 역직렬화합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;@JsonProperty&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;커스텀 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonDeserializer 사용&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
  &lt;/ul&gt;  
 &lt;h2 id=&quot;bd-maven-dependency&quot; data-id=&quot;maven-dependency&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. 메이븐 의존성&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#maven-dependency&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;maven-dependency&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 pom.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 다음 의존성을 추가해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;com.fasterxml.jackson.core&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;jackson-databind&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;2.13.3&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://search.maven.org/classic/#search%7Cgav%7C1%7Cg%3A%22com.fasterxml.jackson.core%22%20AND%20a%3A%22jackson-databind%22&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven Central&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최신 버전의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jackson-databind를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 찾을 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://search.maven.org/classic/#search%7Cgav%7C1%7Cg%3A%22com.fasterxml.jackson.core%22%20AND%20a%3A%22jackson-databind%22&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-json-source&quot; data-id=&quot;json-source&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. JSON 소스&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#json-source&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;json-source&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예제의 소스 자료로 다음 JSON을 고려하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CNaWqPSO8v0CFYyH6QUdeeUHKg&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구조는 인위적이지만 두 수준 깊이로 중첩된 속성을 포함합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-javascript hljs&quot;&gt;{
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;957c43f2-fa2e-42f9-bf75-6e3d5bb6960a&quot;&lt;/span&gt;,
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;The Best Product&quot;&lt;/span&gt;,
    &lt;span class=&quot;hljs-string&quot;&gt;&quot;brand&quot;&lt;/span&gt;: {
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;9bcd817d-0141-42e6-8f04-e5aaab0980b6&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;ACME Products&quot;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot;&gt;&quot;owner&quot;&lt;/span&gt;: {
            &lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;b21a80b1-0c09-4be3-9ebd-ea3653511c13&quot;&lt;/span&gt;,
            &lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&quot;Ultimate Corp, Inc.&quot;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }  &lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-simplified-domain-model&quot; data-id=&quot;simplified-domain-model&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 간소화된 도메인 모델&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#simplified-domain-model&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;simplified-domain-model&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래의 Product&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 클래스 에서 설명하는 평면화된 도메인 모델에서 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;소스 JSON 내에서 한 수준 깊이 중첩된 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;brandName 을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 추출합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 중첩된 브랜드&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 개체 내에서 두 수준 깊이 중첩된 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ownerName 을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 추출합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Product&lt;/span&gt; {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;private&lt;/span&gt; String id;
    &lt;span class=&quot;hljs-keyword&quot;&gt;private&lt;/span&gt; String name;
    &lt;span class=&quot;hljs-keyword&quot;&gt;private&lt;/span&gt; String brandName;
    &lt;span class=&quot;hljs-keyword&quot;&gt;private&lt;/span&gt; String ownerName;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-comment&quot;&gt;// standard getters and setters&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-mapping-with-annotations&quot; data-id=&quot;mapping-with-annotations&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. 어노테이션으로 매핑&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#mapping-with-annotations&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;mapping-with-annotations&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중첩된 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;brandName 속성을 매핑하려면 먼저 중첩된 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;브랜드 개체를 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Map&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 압축 해제하고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;name&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 속성을 추출 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해야 합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ownerName 을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 매핑하기 위해 중첩된 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;소유자 개체를 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Map&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;압축 해제 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이름&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 속성을 추출합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;@JsonProperty&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 &lt;/font&gt;&lt;/strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Product&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 클래스 에 추가하는 몇 가지 사용자 지정 논리 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의 조합을 사용하여&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Jackson에게 중첩된 속성의 압축을 풀도록 지시할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CNeWqPSO8v0CFYyH6QUdeeUHKg&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Product&lt;/span&gt; {
    &lt;span class=&quot;hljs-comment&quot;&gt;// ...&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@SuppressWarnings(&quot;unchecked&quot;)&lt;/span&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@JsonProperty(&quot;brand&quot;)&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;unpackNested&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;(Map&amp;lt;String,Object&amp;gt; brand)&lt;/span&gt; {
        &lt;span class=&quot;hljs-built_in&quot;&gt;this&lt;/span&gt;.brandName = (String)brand.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
        Map&amp;lt;String,String&amp;gt; owner = (Map&amp;lt;String,String&amp;gt;)brand.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;owner&quot;&lt;/span&gt;);
        &lt;span class=&quot;hljs-built_in&quot;&gt;this&lt;/span&gt;.ownerName = owner.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;클라이언트 코드는 이제 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ObjectMapper를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 테스트 클래스 내에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문자열 상수 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SOURCE_JSON &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;으로&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 존재하는 소스 JSON을 변환 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@Test&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;whenUsingAnnotations_thenOk&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;throws&lt;/span&gt; IOException {
    &lt;span class=&quot;hljs-type&quot;&gt;Product&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;product&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ObjectMapper&lt;/span&gt;()&lt;font&gt;&lt;/font&gt;
      .readerFor(Product.class)&lt;font&gt;&lt;/font&gt;
      .readValue(SOURCE_JSON);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;The Best Product&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getBrandName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;ACME Products&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getOwnerName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;Ultimate Corp, Inc.&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-mapping-with-jsonnode&quot; data-id=&quot;mapping-with-jsonnode&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode 로 매핑하기&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#mapping-with-jsonnode&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;mapping-with-jsonnode&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중첩된 데이터 구조를 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 매핑하려면 약간의 추가 작업이 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기서 ObjectMapper&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;readTree를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원하는 필드를 구문 분석합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@Test&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;whenUsingJsonNode_thenOk&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;throws&lt;/span&gt; IOException {
    &lt;span class=&quot;hljs-type&quot;&gt;JsonNode&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;productNode&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ObjectMapper&lt;/span&gt;().readTree(SOURCE_JSON);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-type&quot;&gt;Product&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;product&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Product&lt;/span&gt;();&lt;font&gt;&lt;/font&gt;
    product.setId(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
    product.setName(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
    product.setBrandName(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;brand&quot;&lt;/span&gt;)&lt;font&gt;&lt;/font&gt;
      .get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
    product.setOwnerName(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;brand&quot;&lt;/span&gt;)&lt;font&gt;&lt;/font&gt;
      .get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;owner&quot;&lt;/span&gt;).get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;The Best Product&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getBrandName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;ACME Products&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getOwnerName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;Ultimate Corp, Inc.&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-mapping-with-custom-jsondeserializer&quot; data-id=&quot;mapping-with-custom-jsondeserializer&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7. 사용자 지정 JsonDeserializer&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 매핑&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#mapping-with-custom-jsondeserializer&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;mapping-with-custom-jsondeserializer&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중첩된 데이터 구조를 사용자 정의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonDeserializer&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 매핑하는 것은 구현 관점에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonNode&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 접근 방식 과 동일합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 JsonDeserializer를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 만듭니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;CNiWqPSO8v0CFYyH6QUdeeUHKg&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ProductDeserializer&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;StdDeserializer&lt;/span&gt;&amp;lt;Product&amp;gt; {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;ProductDeserializer&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt; {
        &lt;span class=&quot;hljs-built_in&quot;&gt;this&lt;/span&gt;(&lt;span class=&quot;hljs-literal&quot;&gt;null&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;ProductDeserializer&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;(Class&amp;lt;?&amp;gt; vc)&lt;/span&gt; {
        &lt;span class=&quot;hljs-built_in&quot;&gt;super&lt;/span&gt;(vc);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; Product &lt;span class=&quot;hljs-title function_&quot;&gt;deserialize&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;(JsonParser jp, DeserializationContext ctxt)&lt;/span&gt; 
      &lt;span class=&quot;hljs-keyword&quot;&gt;throws&lt;/span&gt; IOException, JsonProcessingException {&lt;font&gt;&lt;/font&gt;
 &lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-type&quot;&gt;JsonNode&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;productNode&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; jp.getCodec().readTree(jp);
        &lt;span class=&quot;hljs-type&quot;&gt;Product&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;product&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Product&lt;/span&gt;();&lt;font&gt;&lt;/font&gt;
        product.setId(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;id&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
        product.setName(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
        product.setBrandName(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;brand&quot;&lt;/span&gt;)&lt;font&gt;&lt;/font&gt;
          .get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;).textValue());&lt;font&gt;&lt;/font&gt;
        product.setOwnerName(productNode.get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;brand&quot;&lt;/span&gt;).get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;owner&quot;&lt;/span&gt;)&lt;font&gt;&lt;/font&gt;
          .get(&lt;span class=&quot;hljs-string&quot;&gt;&quot;name&quot;&lt;/span&gt;).textValue());		
        &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; product;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;h3 id=&quot;bd-1-manual-registration-of-deserializer&quot; data-id=&quot;1-manual-registration-of-deserializer&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Deserializer 수동 등록&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-manual-registration-of-deserializer&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-manual-registration-of-deserializer&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 지정 역직렬 변환기를 수동으로 등록하려면 클라이언트 코드에서 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Module&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonDeserializer를 추가하고 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Module을 &lt;/font&gt;&lt;/em&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ObjectMapper&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;등록 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;하고 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;readValue를&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 호출해야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@Test&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;whenUsingDeserializerManuallyRegistered_thenOk&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt;
 &lt;span class=&quot;hljs-keyword&quot;&gt;throws&lt;/span&gt; IOException {&lt;font&gt;&lt;/font&gt;
 &lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-type&quot;&gt;ObjectMapper&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;mapper&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ObjectMapper&lt;/span&gt;();
    &lt;span class=&quot;hljs-type&quot;&gt;SimpleModule&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;module&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;SimpleModule&lt;/span&gt;();
    &lt;span class=&quot;hljs-keyword&quot;&gt;module&lt;/span&gt;.addDeserializer(Product.class, &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ProductDeserializer&lt;/span&gt;());&lt;font&gt;&lt;/font&gt;
    mapper.registerModule(&lt;span class=&quot;hljs-keyword&quot;&gt;module&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-type&quot;&gt;Product&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;product&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mapper.readValue(SOURCE_JSON, Product.class);&lt;font&gt;&lt;/font&gt;
 &lt;font&gt;&lt;/font&gt;
    assertEquals(product.getName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;The Best Product&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getBrandName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;ACME Products&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getOwnerName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;Ultimate Corp, Inc.&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;h3 id=&quot;bd-2-automatic-registration-of-deserializer&quot; data-id=&quot;2-automatic-registration-of-deserializer&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디시리얼라이저 자동 등록&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-automatic-registration-of-deserializer&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-automatic-registration-of-deserializer&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JsonDeserializer&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 수동으로 등록하는 대신 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;클래스에 직접 deserializer를 등록&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@JsonDeserialize(using = ProductDeserializer.class)&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;Product&lt;/span&gt; {
    &lt;span class=&quot;hljs-comment&quot;&gt;// ...&lt;/span&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 방법을 사용하면 수동으로 등록할 필요가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자동 등록을 사용하는 클라이언트 코드를 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@Test&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;whenUsingDeserializerAutoRegistered_thenOk&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;hljs-keyword&quot;&gt;throws&lt;/span&gt; IOException {&lt;font&gt;&lt;/font&gt;
 &lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-type&quot;&gt;ObjectMapper&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;mapper&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;ObjectMapper&lt;/span&gt;();
    &lt;span class=&quot;hljs-type&quot;&gt;Product&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;product&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mapper.readValue(SOURCE_JSON, Product.class);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;The Best Product&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getBrandName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;ACME Products&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    assertEquals(product.getOwnerName(), &lt;span class=&quot;hljs-string&quot;&gt;&quot;Ultimate Corp, Inc.&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;8. 결론&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서는 중첩된 값을 포함하는 JSON을 구문 분석하기 위해 Jackson을 사용하는 여러 가지 방법을 설명했습니다 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;/jackson&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;더 많은 예제를 보려면 기본 Jackson Tutorial&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 페이지를 살펴보십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그리고 항상 그렇듯이 코드 스니펫은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/eugenp/tutorials/tree/master/jackson-modules/jackson-conversions&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GitHub 에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 찾을 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – Jackson (eBook) (cat=Jackson)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner footer-jackson-banner&quot;&gt; 
    &lt;img class=&quot;&quot; src=&quot;wp-content/uploads/2016/05/baeldung-jackson-post-footer-main-1.2.0.jpg&quot; alt=&quot;Jackson으로 올바른 JSON 수행 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img src=&quot;wp-content/uploads/2016/05/baeldung-jackson-lightbox-icn-1_kraken.png&quot; alt=&quot;Jackson으로 올바른 JSON 수행 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div class=&quot;bigger&quot;&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jackson과 함께 JSON을 올바르게 수행&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/do-json-with-jackson-ebook&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/jackson-nested-values&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1485</guid>
      <comments>https://recordsoflife.tistory.com/1485#entry1485comment</comments>
      <pubDate>Thu, 23 Mar 2023 22:09:39 +0900</pubDate>
    </item>
    <item>
      <title>Maven에서 WAR 파일 생성</title>
      <link>https://recordsoflife.tistory.com/1484</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-overview&quot; data-id=&quot;overview&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;overview&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 애플리케이션 리소스 또는 웹 애플리케이션 아카이브는 일반적으로 WAR 파일이라고 합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일은 애플리케이션 서버에서 Java EE 웹 애플리케이션을 배포하는 데 사용됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일 내에서 모든 웹 구성 요소는 하나의 단일 단위로 압축됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에는 JAR 파일, JavaServer Pages, Java 서블릿, Java 클래스 파일, XML 파일, HTML 파일 및 웹 애플리케이션에 필요한 기타 리소스 파일이 포함됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;a href=&quot;/maven&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 은 컴파일, 패키징 및 아티팩트 관리와 같은 빌드 작업을 처리하기 위해 Java EE 프로젝트에서 널리 사용되는 인기 있는 빌드 관리 도구입니다. &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven WAR 플러그인을 사용하여 프로젝트를 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/java-jar-war-packaging#war&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 빌드 할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 예제에서는 Java EE 애플리케이션과 함께 Maven WAR 플러그인의 사용을 고려할 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 위해 간단한 Maven Spring Boot 웹 애플리케이션을 만들고 여기에서 WAR 파일을 생성합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-setting-up-a-spring-boot-web-application&quot; data-id=&quot;setting-up-a-spring-boot-web-application&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. Spring Boot 웹 애플리케이션 설정&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#setting-up-a-spring-boot-web-application&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;setting-up-a-spring-boot-web-application&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 Maven, Spring Boot 및 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/thymeleaf-in-spring-mvc&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Thymeleaf&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 웹 애플리케이션을 만들어 WAR 파일 생성 프로세스를 시연해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 Spring Boot 웹 애플리케이션을 빌드하는 데 필요한 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pom.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일 에 의존성을 추가합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CNvYh5iO8v0CFV2H6QUdpmsNSQ&quot;&gt; 
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none;&quot;&gt;
    &lt;iframe id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0&quot; name=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0&quot; title=&quot;타사 광고 콘텐츠&quot; width=&quot;1086&quot; height=&quot;280&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot; role=&quot;region&quot; aria-label=&quot;광고&quot; tabindex=&quot;0&quot; style=&quot;border: 0px; vertical-align: bottom;&quot; data-load-complete=&quot;true&quot; data-google-container-id=&quot;2&quot;&gt;&lt;/iframe&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-thymeleaf&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-tomcat&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;scope&lt;/span&gt;&amp;gt;&lt;/span&gt;provided&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;scope&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음으로 MainController&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 클래스를 생성해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 클래스에서는 HTML 파일을 보기 위해 단일 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GET&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 컨트롤러 메서드를 만들 것입니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@Controller&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;MainController&lt;/span&gt; {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@GetMapping(&quot;/&quot;)&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; String &lt;span class=&quot;hljs-title function_&quot;&gt;viewIndexPage&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;(Model model)&lt;/span&gt; {&lt;font&gt;&lt;/font&gt;
        model.addAttribute(&lt;span class=&quot;hljs-string&quot;&gt;&quot;header&quot;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot;&gt;&quot;Maven Generate War&quot;&lt;/span&gt;);
        &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&quot;index&quot;&lt;/span&gt;;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 index.html&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일을 만들 차례입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;부트스트랩 CSS 파일도 프로젝트에 포함되어 있으며 일부 CSS 클래스는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;index.html&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일에서 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;&amp;lt;!DOCTYPE &lt;span class=&quot;hljs-keyword&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;lang&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;en&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;xmlns:th&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;http://www.thymeleaf.org&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;lang&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;en&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;Index&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;title&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-comment&quot;&gt;&amp;lt;!-- Bootstrap core CSS --&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;th:href&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;@{/css/bootstrap.min.css}&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;rel&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;head&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;nav&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;navbar navbar-light bg-light&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;container-fluid&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;navbar-brand&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;#&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
                Baeldung Tutorial&lt;font&gt;&lt;/font&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;nav&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;container&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/span&gt;[[${header}]]&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;h1&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;body&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-maven-war-plugin&quot; data-id=&quot;maven-war-plugin&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. 메이븐 WAR 플러그인&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#maven-war-plugin&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;maven-war-plugin&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven WAR 플러그인은 웹 애플리케이션의 모든 의존성, 클래스 및 리소스를 웹 애플리케이션 아카이브로 수집하고 컴파일하는 역할을 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven WAR 플러그인에는 몇 가지 정의된 목표가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
   &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : 프로젝트의 패키징 단계에서 호출되는 기본 목표입니다. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패키징&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 유형이 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 인 경우 WAR 파일을 빌드합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;exploded&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : 이 목표는 일반적으로 테스트 속도를 높이기 위해 프로젝트 개발 단계에서 사용됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지정된 디렉토리에 분해된 웹 앱을 생성합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;inplace : &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;분해된&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 목표 의 변형입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 응용 프로그램 폴더 내에 분해된 웹 응용 프로그램을 생성합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pom.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일 에 Maven WAR 플러그인을 추가해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;COyPhJiO8v0CFV2H6QUdpmsNSQ&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;maven-war-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;3.3.1&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn install&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령을 실행하면 대상 폴더 내에 WAR 파일이 생성됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn:war:exploded&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령을 사용하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;폭발된 WAR을 대상 디렉토리 내부의 디렉토리로 생성할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 일반 디렉토리이며 WAR 파일 내부의 모든 파일은 분해된 WAR 디렉토리 내부에 포함됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-include-or-exclude-war-file-content&quot; data-id=&quot;include-or-exclude-war-file-content&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. WAR 파일 콘텐츠 포함 또는 제외&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#include-or-exclude-war-file-content&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;include-or-exclude-war-file-content&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven WAR 플러그인을 사용하여 WAR 파일의 내용을 필터링할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일 내에 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;additional_resources&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 폴더를 포함하도록 Maven WAR 플러그인을 구성해 보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;maven-war-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;3.3.1&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;webResources&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;resource&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;directory&lt;/span&gt;&amp;gt;&lt;/span&gt;additional_resources&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;directory&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;resource&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;webResources&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn install&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령을 실행하면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;additional_resources&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 폴더 아래의 모든 콘텐츠를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일 내에서 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 보고서와 같은 일부 추가 리소스를 WAR 파일에 추가해야 할 때 유용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-edit-manifest-file&quot; data-id=&quot;edit-manifest-file&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. 매니페스트 파일 편집&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#edit-manifest-file&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;edit-manifest-file&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven WAR 플러그인을 사용하면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매니페스트&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일을 사용자 정의할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 매니페스트&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일 에 클래스 경로를 추가할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이는 WAR 파일이 보다 복잡한 구조에 있고 여러 모듈 간에 프로젝트 의존성을 공유해야 할 때 매우 유용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;CO2PhJiO8v0CFV2H6QUdpmsNSQ&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매니페스트&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일 에 클래스 경로를 추가하도록 Maven WAR 플러그인을 구성해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;maven-war-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;3.3.1&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;archive&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;manifest&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;addClasspath&lt;/span&gt;&amp;gt;&lt;/span&gt;true&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;addClasspath&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;manifest&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;archive&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 짧은 사용방법(예제)에서는 Maven 빌드 도구를 사용하여 WAR 파일을 생성하는 방법에 대해 설명했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작업을 시연하기 위해 Maven Spring Boot 웹 애플리케이션을 만들었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일을 생성하기 위해 Maven WAR 플러그인이라는 특수 플러그인을 사용했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전체 소스 코드 예제는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/eugenp/tutorials/tree/master/maven-modules/maven-generate-war&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GitHub에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용할 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – Maven (eBook) (cat=Maven)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner footer-maven-banner&quot;&gt; 
    &lt;img class=&quot;&quot; src=&quot;wp-content/uploads/2022/06/maven-ebook-post-footer-1.jpg&quot; alt=&quot;Apache Maven 사용방법(예제) - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img src=&quot;wp-content/uploads/2022/06/maven-ebook-post-footer-icon.png&quot; alt=&quot;아파치 메이븐 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아파치 메이븐 시작하기&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/maven-ebook&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/maven-generate-war-file&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1484</guid>
      <comments>https://recordsoflife.tistory.com/1484#entry1484comment</comments>
      <pubDate>Thu, 23 Mar 2023 22:05:07 +0900</pubDate>
    </item>
    <item>
      <title>Docker 컨테이너에 Java War 배포</title>
      <link>https://recordsoflife.tistory.com/1483</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-overview&quot; data-id=&quot;overview&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;overview&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;/ops/docker-guide&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 사용방법(예제)에서는 Docker&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 컨테이너 내부에 Java WAR 파일을 배포하는 방법을 배웁니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 커뮤니티에서 널리 사용되는 무료 오픈 소스 웹 서버인 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://tomcat.apache.org&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Apache Tomcat&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 WAR 파일을 배포합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-deploy-a-war-file-to-tomcat&quot; data-id=&quot;deploy-a-war-file-to-tomcat&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. Tomcat에 WAR 파일 배포&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#deploy-a-war-file-to-tomcat&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;deploy-a-war-file-to-tomcat&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR(Web Application Archive)은 모든 웹 애플리케이션 관련 파일과 해당 디렉토리 구조를 패키지하는 압축 아카이브 파일입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단하게 하기 위해 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/tomcat-deploy-war&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat에 WAR 파일을 배포하는&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 것은 해당 WAR 파일을 Tomcat 서버의 배포 디렉터리에 복사하는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Linux의 배포 디렉터리는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME/webapps&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 . &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME은&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Tomcat 서버의 설치 ​​디렉터리를 나타냅니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 배포 디렉터리 내에서 WAR 파일을 추출하는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 서버를 다시 시작&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 해야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CKSGu86N8v0CFYmI6QUdzCcNgw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;h2 id=&quot;bd-deploy-war-in-docker-container&quot; data-id=&quot;deploy-war-in-docker-container&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. Docker 컨테이너에 WAR 배포&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#deploy-war-in-docker-container&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;deploy-war-in-docker-container&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 서버에 배포해야 하는 애플리케이션 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ROOT.war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 대한 WAR 파일이 있다고 가정해 보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;목표를 달성하려면 먼저 Dockerfile을 만들어야 합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 Dockerfile에는 애플리케이션을 실행하는 데 필요한 모든 의존성이 포함됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 이 Dockerfile을 사용하여 Docker 이미지를 만든 다음 Docker 컨테이너를 시작하는 단계를 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 이러한 단계를 하나씩 자세히 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-create-dockerfile&quot; data-id=&quot;1-create-dockerfile&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dockerfile 만들기&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-create-dockerfile&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-create-dockerfile&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://hub.docker.com/_/tomcat&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat의 최신 Docker 이미지를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Dockerfile의 기본 이미지로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용합니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 이미지를 사용할 때의 이점은 필요한 모든 의존성/패키지가 미리 설치되어 있다는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 최신 Ubuntu/CentOS Docker 이미지를 사용하는 경우 Java, Tomcat 및 기타 필수 패키지를 수동으로 설치해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CKWGu86N8v0CFYmI6QUdzCcNgw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필요한 모든 패키지가 이미 설치되어 있으므로 WAR 파일인 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ROOT.war 를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Tomcat 서버의 배포 디렉터리에 복사하기만 하면 됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그게 다야!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자세히 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;$ &lt;span class=&quot;hljs-built_in&quot;&gt;ls&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
Dockerfile  ROOT.war&lt;font&gt;&lt;/font&gt;
$ &lt;span class=&quot;hljs-built_in&quot;&gt;cat&lt;/span&gt; Dockerfile &lt;font&gt;&lt;/font&gt;
FROM tomcat&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
COPY ROOT.war /usr/local/tomcat/webapps/&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME/webapps는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Tomcat의 배포 디렉터리를 나타냅니다 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에서&lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat의 공식 Docker 이미지에 대한&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; CATALINA_HOME은 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/usr/local/tomcat&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 . &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;결과적으로 완전한 배포 디렉토리는 /usr/local/tomcat/webapps&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 가 됩니다&amp;nbsp;&lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기서 사용한 애플리케이션은 매우 간단하며 다른 의존성이 필요하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-build-the-docker-image&quot; data-id=&quot;2-build-the-docker-image&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도커 이미지 빌드&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-build-the-docker-image&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-build-the-docker-image&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 방금 만든 Dockerfile을 사용하여 Docker 이미지를 만들어 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;CKaGu86N8v0CFYmI6QUdzCcNgw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;$ &lt;span class=&quot;hljs-built_in&quot;&gt;pwd&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
/baeldung&lt;font&gt;&lt;/font&gt;
$ &lt;span class=&quot;hljs-built_in&quot;&gt;ls&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
Dockerfile  ROOT.war&lt;font&gt;&lt;/font&gt;
$ docker build -t myapp .&lt;font&gt;&lt;/font&gt;
Sending build context to Docker daemon  19.97kB&lt;font&gt;&lt;/font&gt;
Step 1/2 : FROM tomcat&lt;font&gt;&lt;/font&gt;
 ---&amp;gt; 710ec5c56683&lt;font&gt;&lt;/font&gt;
Step 2/2 : COPY ROOT.war /usr/local/tomcat/webapps/&lt;font&gt;&lt;/font&gt;
 ---&amp;gt; Using cache&lt;font&gt;&lt;/font&gt;
 ---&amp;gt; 8b132ab37a0e&lt;font&gt;&lt;/font&gt;
Successfully built 8b132ab37a0e&lt;font&gt;&lt;/font&gt;
Successfully tagged myapp:latest&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;docker &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;build&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령은 myapp 태그가 있는 Docker 이미지를 생성합니다 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dockerfile이 있는 디렉터리 내에서 Docker 이미지를 빌드해야 합니다. &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 예에서 우리는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Docker 이미지를 빌드할 때 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/baeldung 디렉터리 안에 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-3-run-docker-container&quot; data-id=&quot;3-run-docker-container&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.3. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Docker 컨테이너 실행&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#3-run-docker-container&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;3-run-docker-container&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지금까지 Dockerfile을 만들고 Docker 이미지를 빌드했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 Docker 컨테이너를 실행해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;$ docker run -itd -p 8080:8080 --name my_application_container myapp&lt;font&gt;&lt;/font&gt;
e90c61fdb4ac85b198903e4d744f7b0f3c18c9499ed6e2bbe2f39da0211d42c0&lt;font&gt;&lt;/font&gt;
$ docker ps &lt;font&gt;&lt;/font&gt;
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES&lt;font&gt;&lt;/font&gt;
e90c61fdb4ac        myapp               &lt;span class=&quot;hljs-string&quot;&gt;&quot;catalina.sh run&quot;&lt;/span&gt;   6 seconds ago       Up 5 seconds        0.0.0.0:8080-&amp;gt;8080/tcp   my_application_container
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 명령은 Docker 이미지 myapp를 사용하여 이름이 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;my_application_container&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 인 Docker 컨테이너를 시작합니다&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 서버의 기본 포트는 8080입니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 따라서 Docker 컨테이너를 시작하는 동안 항상 컨테이너 포트 8080을 사용 가능한 호스트 포트와 바인딩해야 합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에서는 단순화를 위해 호스트 포트 8080을 사용했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-4-verify-the-setup&quot; data-id=&quot;4-verify-the-setup&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.4. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설정 확인&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#4-verify-the-setup&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;4-verify-the-setup&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 지금까지 수행한 모든 작업을 확인하겠습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션을 보기 위해 브라우저에서 URL &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://&amp;lt;IP&amp;gt;:&amp;lt;PORT&amp;gt;에&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 액세스합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;IP는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Docker 호스트 시스템의 공용 IP(또는 경우에 따라 개인 IP)를 나타냅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PORT &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Docker 컨테이너(이 경우 8080)를 실행하는 동안 노출한 컨테이너 포트입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Linux에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://curl.se/docs/manpage.html&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;curl&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 유틸리티를 사용하여 설정을 확인할 수도 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-5&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_1&quot; name=&quot;baeldung_incontent_1&quot; data-google-query-id=&quot;CKeGu86N8v0CFYmI6QUdzCcNgw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;$ curl http://localhost:8080&lt;font&gt;&lt;/font&gt;
Hi from Baeldung!!!&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 명령에서 우리는 Docker 호스트 시스템에서 명령을 실행하고 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 localhost를 사용하여 애플리케이션에 연결할 수 있습니다 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이에 대한 응답으로 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;curl&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 유틸리티는 애플리케이션 웹 페이지의 원시 HTML을 인쇄합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서는 Docker 컨테이너에 Java WAR 파일을 배포하는 방법을 배웠습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;공식 Tomcat Docker 이미지를 사용하여 Dockerfile을 만드는 것부터 시작했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 Docker 이미지를 빌드하고 애플리케이션 컨테이너를 실행했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 애플리케이션 URL에 액세스하여 설정을 확인했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – REST with Spring (eBook) (everywhere)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner&quot;&gt; 
    &lt;img class=&quot;&quot; width=&quot;800&quot; height=&quot;360&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-main-1.2.0.jpg&quot; alt=&quot;SPRING으로 API 구축 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img class=&quot;&quot; width=&quot;300&quot; height=&quot;300&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-icn-1.0.0.png&quot; alt=&quot;SPRING으로 API 구축 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
        &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;
       &lt;br&gt;
       &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring으로&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; API를 구축하는 방법을 배우고 있습니까 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;?&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/rest-api-spring-guide&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/docker-deploy-java-war&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1483</guid>
      <comments>https://recordsoflife.tistory.com/1483#entry1483comment</comments>
      <pubDate>Thu, 23 Mar 2023 22:01:56 +0900</pubDate>
    </item>
    <item>
      <title>Maven과 실행 가능한 War/Jar로 Spring Boot 앱 실행</title>
      <link>https://recordsoflife.tistory.com/1482</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-introduction&quot; data-id=&quot;introduction&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 소개&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#introduction&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;introduction&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 예제에서는 mvn spring-boot:run 명령을 통해 Spring Boot 웹 애플리케이션을 시작하는 것과 &lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;java -jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령 을 통해 jar/war 패키지로 컴파일한 후 실행하는 것의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;차이점을 살펴보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 사용방법(예제)의 목적을 위해 Spring Boot 리패키지&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 목표 의 구성에 익숙하다고 가정합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/deployable-fat-jar-spring-boot&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 항목에 대한 자세한 내용은 Spring Boot로 Fat Jar 앱 만들기를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 참조하세요 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-spring-maven-plugin&quot; data-id=&quot;spring-maven-plugin&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. Spring Boot Maven 플러그인&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#spring-maven-plugin&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;spring-maven-plugin&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring Boot 애플리케이션을 작성할 때 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring Boot Maven 플러그인은&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 코드를 빌드, 테스트 및 패키징하는 데 권장되는 도구입니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 플러그인은 다음과 같은 편리한 기능을 많이 제공합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;올바른 의존성 버전을 해결합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 의존성(필요한 경우 임베디드 애플리케이션 서버 포함)을 하나의 실행 가능한 팻 jar/war로 패키징할 수 있으며 다음도 수행합니다. &lt;/font&gt;&lt;/font&gt;
   &lt;ul&gt; 
    &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;클래스 경로 구성을 관리하여 java -jar&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에서 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;긴 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;-cp 옵션을 건너뛸 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/li&gt; 
    &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 패키지 내부에 중첩된 모든 외부 jar 라이브러리를 찾아 로드하기 위해 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 정의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ClassLoader를 구현합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자동으로 main()&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메서드를 찾고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매니페스트에서 구성하므로 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;java -jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령 에서 기본 클래스를 지정할 필요가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
    &lt;/ul&gt; &lt;/li&gt; 
  &lt;/ul&gt; 
 &lt;h2 id=&quot;bd-code-exploded&quot; data-id=&quot;code-exploded&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. 분해된 형태로 Maven으로 코드 실행하기&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#code-exploded&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;code-exploded&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 애플리케이션에서 작업할 때 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring Boot Maven 플러그인의 또 다른 매우 흥미로운 기능을 활용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 바로 임베디드 애플리케이션 서버에 웹 애플리케이션을 자동으로 배포하는 기능입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CN_15MWM8v0CFaWG6QUdnykP0w&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat을 사용하여 코드를 실행하고 싶다는 것을 플러그인에 알리려면 하나의 의존성만 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;spring-boot-starter-web&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt; 
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 프로젝트 루트 폴더에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn spring-boot:run&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령을 실행할 때 플러그인은 pom 구성을 읽고 웹 애플리케이션 컨테이너가 필요하다는 것을 이해합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn spring-boot:run&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령을 실행하면&amp;nbsp; &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Apache Tomcat 다운로드가 트리거되고 Tomcat 시작이 초기화됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;$ mvn spring-boot:run&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
[INFO] --------------------&amp;lt; com.baeldung:spring-boot-ops &amp;gt;--------------------&lt;font&gt;&lt;/font&gt;
[INFO] Building spring-boot-ops 0.0.1-SNAPSHOT&lt;font&gt;&lt;/font&gt;
[INFO] --------------------------------[ war ]---------------------------------&lt;font&gt;&lt;/font&gt;
[INFO]&lt;font&gt;&lt;/font&gt;
[INFO] &amp;gt;&amp;gt;&amp;gt; spring-boot-maven-plugin:2.1.3.RELEASE:run (default-cli) &amp;gt; test-compile @ spring-boot-ops &amp;gt;&amp;gt;&amp;gt;&lt;font&gt;&lt;/font&gt;
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.16/tomcat-embed-core-9.0.16.pom&lt;font&gt;&lt;/font&gt;
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.16/tomcat-embed-core-9.0.16.pom (1.8 kB at 2.8 kB/s)&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
[INFO] --- spring-boot-maven-plugin:2.1.3.RELEASE:run (default-cli) @ spring-boot-ops ---&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
11:33:36.648 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]&lt;font&gt;&lt;/font&gt;
11:33:36.649 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.16]&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
11:33:36.952 [main] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
11:33:48.223 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler [&lt;span class=&quot;hljs-string&quot;&gt;&quot;http-nio-8080&quot;&lt;/span&gt;]&lt;font&gt;&lt;/font&gt;
11:33:48.289 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path &lt;span class=&quot;hljs-string&quot;&gt;''&lt;/span&gt;
11:33:48.292 [main] INFO  org.baeldung.boot.Application - Started Application &lt;span class=&quot;hljs-keyword&quot;&gt;in&lt;/span&gt; 22.454 seconds (JVM running &lt;span class=&quot;hljs-keyword&quot;&gt;for&lt;/span&gt; 37.692)&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로그에 'Started Application'이 포함된 줄이 표시되면 브라우저 주소 http://localhost:8080/에서 웹 애플리케이션을 쿼리할 준비가 된 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-code-stand-alone-app&quot; data-id=&quot;code-stand-alone-app&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 코드를 독립 실행형 패키지 애플리케이션으로 실행&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#code-stand-alone-app&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;code-stand-alone-app&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개발 단계를 통과하고 애플리케이션을 프로덕션으로 가져오는 과정이 진행되면 애플리케이션을 패키징해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;COD15MWM8v0CFaWG6QUdnykP0w&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;안타깝게도 jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 패키지 로 작업하는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본 Maven &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패키지&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 목표에는 외부 의존성이 포함되지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이는 더 큰 프로젝트에서 라이브러리로만 사용할 수 있음을 의미합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 제한을 피하려면 Maven Spring Boot 플러그인 &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt; &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;리패키지&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 목표를 활용하여 jar/war를 독립 실행형 애플리케이션으로 실행 &lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-configuration&quot; data-id=&quot;1-configuration&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구성&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-configuration&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-configuration&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반적으로 빌드 플러그인만 구성하면 됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;build&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugins&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
        ...&lt;font&gt;&lt;/font&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;spring-boot-maven-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
        ...&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugins&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;build&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예제 프로젝트에는 둘 이상의 기본 클래스가 포함되어 있으므로 플러그인을 구성하여 실행할 클래스를 Java에 알려야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.springframework.boot&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;spring-boot-maven-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;executions&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;execution&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;mainClass&lt;/span&gt;&amp;gt;&lt;/span&gt;com.baeldung.webjar.WebjarsdemoApplication&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;mainClass&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;execution&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;executions&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 시작 클래스&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 속성 설정 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;COH15MWM8v0CFaWG6QUdnykP0w&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;properties&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;start-class&lt;/span&gt;&amp;gt;&lt;/span&gt;com.baeldung.webjar.WebjarsdemoApplication&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;start-class&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;properties&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;h3 id=&quot;bd-2-running-the-application&quot; data-id=&quot;2-running-the-application&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션 실행&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-running-the-application&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-running-the-application&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 두 가지 간단한 명령으로 예제 전쟁을 실행할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;$ mvn clean package spring-boot:repackage&lt;font&gt;&lt;/font&gt;
$ java -jar target/spring-boot-ops.war&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;/java-run-jar-with-arguments&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jar 파일을 실행하는 방법에 대한 자세한 내용은 Run JAR Application With Command Line Arguments&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 문서에서 확인할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-3-inside-the-war-file&quot; data-id=&quot;3-inside-the-war-file&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.3. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전쟁 파일 내부&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#3-inside-the-war-file&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;3-inside-the-war-file&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위에서 언급한 명령이 전체 서버 애플리케이션을 실행하는 방법을 더 잘 이해하기 위해 spring-boot-ops.war를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 살펴볼 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;압축을 풀고 내부를 들여다보면 일반적인 용의자를 찾을 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;META-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , 자동 생성된&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MANIFEST.MF 포함&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컴파일된 클래스를 포함하는 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF/classes&lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF/lib&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , 우리의 전쟁 의존성 및 포함된 Tomcat jar 파일을 보유합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;팻 패키지 구성과 관련된 일부 폴더가 있기 때문에 이것이 전부는 아닙니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&amp;nbsp;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF/lib-provided&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , 포함 실행 시 필요하지만 배포 시 필요하지 않은 외부 라이브러리 포함&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;org/springframework/boot/loader&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; - Spring Boot 사용자 정의 클래스 로더를 보유합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 라이브러리는 외부 의존성을 로드하고 런타임에 액세스할 수 있도록 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
 &lt;h3 id=&quot;bd-4-inside-the-war-manifest&quot; data-id=&quot;4-inside-the-war-manifest&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.4. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전쟁 선언문 내부&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#4-inside-the-war-manifest&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;4-inside-the-war-manifest&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;앞서 언급했듯이 Maven Spring Boot 플러그인은 메인 클래스를 찾아 java&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령 을 실행하는 데 필요한 구성을 생성합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;결과 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MANIFEST.MF에는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 몇 가지 추가 줄이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-plaintext hljs&quot;&gt;Start-Class: com.baeldung.webjar.WebjarsdemoApplication&lt;font&gt;&lt;/font&gt;
Main-Class: org.springframework.boot.loader.WarLauncher&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;특히 마지막 항목은 사용할 Spring Boot 클래스 로더 실행기를 지정하는 것을 볼 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-5&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_1&quot; name=&quot;baeldung_incontent_1&quot; data-google-query-id=&quot;COL15MWM8v0CFaWG6QUdnykP0w&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;h3 id=&quot;bd-5-inside-a-jar-file&quot; data-id=&quot;5-inside-a-jar-file&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.5. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jar 파일 내부&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#5-inside-a-jar-file&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;5-inside-a-jar-file&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본 패키징 전략으로 인해 우리의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전쟁 패키징 시나리오는 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring Boot Maven Plugin을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하든 사용하지 않든 크게 다르지 않습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;플러그인의 장점을 더 잘 이해하기 위해 pom &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패키징 구성을 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 변경하고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn clean 패키지를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 다시 실행해 볼 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 fat jar가 이전 war 파일과 약간 다르게 구성되어 있음을 관찰할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 클래스 및 리소스 폴더는 이제 BOOT-INF/classes&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 아래에 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;BOOT-INF/lib는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 모든 외부 라이브러리를 보유합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;플러그인이 없으면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;lib&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 폴더가 존재하지 않으며 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;BOOT-INF/classes&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 모든 콘텐츠는 패키지의 루트에 위치합니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-6-inside-the-jar-manifest&quot; data-id=&quot;6-inside-the-jar-manifest&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.6. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jar 매니페스트 내부&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#6-inside-the-jar-manifest&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;6-inside-the-jar-manifest&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매니페스트 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MF도 변경되어 다음과 같은 추가 라인이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-plaintext hljs&quot;&gt;Spring-Boot-Classes: BOOT-INF/classes/&lt;font&gt;&lt;/font&gt;
Spring-Boot-Lib: BOOT-INF/lib/&lt;font&gt;&lt;/font&gt;
Spring-Boot-Version: 2.1.3.RELEASE&lt;font&gt;&lt;/font&gt;
Main-Class: org.springframework.boot.loader.JarLauncher&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring-Boot-Classes&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring-Boot-Lib는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 클래스 로더가 클래스와 외부 라이브러리를 찾을 위치를 알려주므로 특히 흥미롭습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-best-choice&quot; data-id=&quot;best-choice&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. 선택 방법&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#best-choice&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;best-choice&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도구를 분석할 때 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 도구가 만들어진 목적을 반드시 고려해야 합니다. &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개발을 쉽게 하고 싶습니까, 아니면 원활한 배포 및 이식성을 보장하고 싶습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 선택에 의해 가장 영향을 받는 단계를 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-development&quot; data-id=&quot;1-development&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개발&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-development&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-development&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개발자로서 우리는 코드를 로컬에서 실행하기 위해 환경을 설정하는 데 많은 시간을 할애할 필요 없이 대부분의 시간을 코딩하는 데 사용합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 응용 프로그램에서는 일반적으로 문제가 되지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 보다 복잡한 프로젝트의 경우 환경 변수를 설정하고 서버를 시작하고 데이터베이스를 채워야 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-6&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_2&quot; name=&quot;baeldung_incontent_2&quot; data-google-query-id=&quot;COP15MWM8v0CFaWG6QUdnykP0w&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션을 실행하려고 할 때마다 올바른 환경을 구성하는 것은&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 특히 둘 이상의 서비스를 동시에 실행해야 하는 경우 매우 비실용적입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven으로 코드를 실행하면 도움이 됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리는 이미 전체 코드베이스를 로컬에서 체크아웃했기 때문에 pom 구성 및 리소스 파일을 활용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;환경 변수를 설정하고 메모리 내 데이터베이스를 생성하며 올바른 서버 버전을 다운로드하고 하나의 명령으로 애플리케이션을 배포할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;각 모듈마다 다른 변수와 서버 버전이 필요한 다중 모듈 코드베이스에서도 Maven 프로필을 통해 올바른 환경을 쉽게 실행할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-production&quot; data-id=&quot;2-production&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;생산&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-production&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-production&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리가 생산으로 이동할수록 대화는 안정성과 Security으로 더 많이 이동합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇기 때문에 개발 시스템에 사용되는 프로세스를 실제 고객이 있는 서버에 적용할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 단계에서 Maven을 통해 코드를 실행하는 것은 여러 가지 이유로 나쁜 습관입니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우선 Maven을 설치해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 코드를 컴파일해야 하므로 전체 JDK(Java Development Kit)가 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음으로 코드베이스를 서버에 복사하고 모든 독점 코드를 일반 텍스트로 남겨 두어야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mvn &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명령은 수명 주기의 모든 단계(소스 찾기, 컴파일 및 실행)를 실행해야 합니다 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전 포인트 덕분에 CPU도 낭비하고 클라우드 서버의 경우 돈도 낭비합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven은 각각 메모리를 사용하는 여러 Java 프로세스를 생성합니다(기본적으로 각 프로세스는 상위 프로세스와 동일한 메모리 양을 사용함).&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 배포할 서버가 여러 개인 경우 위의 모든 작업이 각 서버에서 반복됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것들은 응용 프로그램을 패키지로 배송하는 것이 생산에 더 실용적인&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 몇 가지 이유입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-conclusions&quot; data-id=&quot;conclusions&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusions&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusions&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서는 Maven을 통해 코드를 실행하는 것과 java -jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령 을 통해 코드를 실행하는 것의 차이점을 살펴보았습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 몇 가지 실제 사례 시나리오에 대한 간략한 개요도 살펴보았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서 사용된 소스 코드는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/eugenp/tutorials/tree/master/spring-boot-modules/spring-boot-artifacts&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GitHub에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용할 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-7&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_3&quot; name=&quot;baeldung_incontent_3&quot; data-google-query-id=&quot;COT15MWM8v0CFaWG6QUdnykP0w&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – Maven (eBook) (cat=Maven)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner footer-maven-banner&quot;&gt; 
    &lt;img class=&quot;&quot; src=&quot;wp-content/uploads/2022/06/maven-ebook-post-footer-1.jpg&quot; alt=&quot;Apache Maven 사용방법(예제) - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img src=&quot;wp-content/uploads/2022/06/maven-ebook-post-footer-icon.png&quot; alt=&quot;아파치 메이븐 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아파치 메이븐 시작하기&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/maven-ebook&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/spring-boot-run-maven-vs-executable-jar&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1482</guid>
      <comments>https://recordsoflife.tistory.com/1482#entry1482comment</comments>
      <pubDate>Thu, 23 Mar 2023 21:59:22 +0900</pubDate>
    </item>
    <item>
      <title>JAR과 WAR 패키징의 차이점</title>
      <link>https://recordsoflife.tistory.com/1481</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-Overview&quot; data-id=&quot;Overview&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Overview&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 빠른 사용방법(예제)에서는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java에서 JAR과 WAR 패키징의 차이점에 중점을 둘 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 각 패키징 옵션을 개별적으로 정의합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 차이점을 요약하겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-jar&quot; data-id=&quot;jar&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. JAR 패키징&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#jar&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;jar&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단히 말해서 JAR(또는 Java 아카이브)은 패키지 파일 형식입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR 파일은 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.jar 확장자를 가지며 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;라이브러리, 리소스 및 메타데이터 파일을&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 포함할 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로 이것은 압축된 버전의 .class&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일과 컴파일된 Java 라이브러리 및 애플리케이션의 리소스를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;포함하는 압축 파일입니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 다음은 간단한 JAR 파일 구조입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CK3VqIWM8v0CFVDVfAodAOUN7g&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-plaintext hljs&quot;&gt;META-INF/&lt;font&gt;&lt;/font&gt;
    MANIFEST.MF&lt;font&gt;&lt;/font&gt;
com/&lt;font&gt;&lt;/font&gt;
    baeldung/&lt;font&gt;&lt;/font&gt;
        MyApplication.class&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;META &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/java-jar-executable-manifest-main-class&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;-INF/MANIFEST.MF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일에는&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 아카이브에 저장된 파일에 대한 추가 메타데이터가 포함될 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jar&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령이나 &lt;/font&gt;&lt;a href=&quot;/executable-jar-with-maven&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven 과 같은 도구를 사용하여 &lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;a href=&quot;/java-create-jar&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일을 만들 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;/executable-jar-with-maven&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-war&quot; data-id=&quot;war&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. WAR 패키징&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#war&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;war&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR은 웹 애플리케이션 아카이브 또는 웹 애플리케이션 리소스를 나타냅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 아카이브 파일은 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 확장자를 가지며 모든 Servlet/JSP 컨테이너에 배포할 수 있는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 애플리케이션을 패키징하는 데 사용&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 됩니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 일반적인 WAR 파일 구조의 예시 레이아웃입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-plaintext hljs&quot;&gt;META-INF/&lt;font&gt;&lt;/font&gt;
    MANIFEST.MF&lt;font&gt;&lt;/font&gt;
WEB-INF/&lt;font&gt;&lt;/font&gt;
    web.xml&lt;font&gt;&lt;/font&gt;
    jsp/&lt;font&gt;&lt;/font&gt;
        helloWorld.jsp&lt;font&gt;&lt;/font&gt;
    classes/&lt;font&gt;&lt;/font&gt;
        static/&lt;font&gt;&lt;/font&gt;
        templates/&lt;font&gt;&lt;/font&gt;
        application.properties&lt;font&gt;&lt;/font&gt;
    lib/&lt;font&gt;&lt;/font&gt;
        // *.jar files as libs&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내부에는 웹 아카이브에 대한 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MANIFEST.MF&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 유용한 정보를 포함하는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;META-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리 가 있습니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;META &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;-INF&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리는 비공개이며 외부에서 접근할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CK7VqIWM8v0CFVDVfAodAOUN7g&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반면에 HTML 페이지, 이미지 및 JS 파일을 포함한 모든 정적 웹 리소스가 있는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 공용 디렉토리도 포함합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;web.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일, 서블릿 클래스 및 라이브러리가 포함되어 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 아카이브 를 빌드하기 위해 JAR을 빌드하는 데 사용한 것과 동일한 도구와 명령을 사용할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-compare&quot; data-id=&quot;compare&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 주요 차이점&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#compare&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;compare&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇다면 이 두 아카이브 유형의 주요 차이점은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;첫 번째이자 가장 분명한 차이점은 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파일 확장자&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR의 확장자는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이고 WAR 파일의 확장자는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째 주요 차이점은 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;목적과 작동 방식&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR 파일을 사용하면 라이브러리, 플러그인 또는 모든 종류의 애플리케이션으로 사용하기 위해 여러 파일을 패키징할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반면 WAR 파일은 웹 애플리케이션에만 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;CK_VqIWM8v0CFVDVfAodAOUN7g&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아카이브의 구조도 다릅니다. &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원하는 구조로 JAR을 만들 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반대로 WAR에는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;META-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리가 있는 미리 정의된 구조가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;/executable-jar-with-maven&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 추가 소프트웨어를 사용하지 않고 실행 가능한&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; JAR 로 빌드하면 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명령줄에서 JAR을 실행할&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 라이브러리로 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반대로 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR을 실행하려면 서버가 필요합니다&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/executable-jar-with-maven&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-Summary&quot; data-id=&quot;Summary&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. 결론&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Summary&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Summary&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 빠른 기사에서는 .jar&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Java 패키징 유형을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비교했습니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇게 함으로써 우리는 둘 다 동일한 ZIP 파일 형식을 사용하지만 몇 가지 중요한 차이점이 있다는 점에 주목했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – REST with Spring (eBook) (everywhere)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner&quot;&gt; 
    &lt;img class=&quot;&quot; width=&quot;800&quot; height=&quot;360&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-main-1.2.0.jpg&quot; alt=&quot;SPRING으로 API 구축 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img class=&quot;&quot; width=&quot;300&quot; height=&quot;300&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-icn-1.0.0.png&quot; alt=&quot;SPRING으로 API 구축 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
        &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;
       &lt;br&gt;
       &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring으로&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; API를 구축하는 방법을 배우고 있습니까 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;?&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/rest-api-spring-guide&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/java-jar-war-packaging&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1481</guid>
      <comments>https://recordsoflife.tistory.com/1481#entry1481comment</comments>
      <pubDate>Thu, 23 Mar 2023 21:54:34 +0900</pubDate>
    </item>
    <item>
      <title>JBoss에서 WAR 파일 배포</title>
      <link>https://recordsoflife.tistory.com/1480</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-introduction&quot; data-id=&quot;introduction&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 소개&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#introduction&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;introduction&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 예제에서는 JBoss 서버에 war 파일을 배포하는 방법을 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;war 파일을 적절한 디렉토리에 수동으로 배치하거나 Eclipse에서 직접 배치하여 배치할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-deploying-the-war-file-by-hand&quot; data-id=&quot;deploying-the-war-file-by-hand&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. WAR 파일을 직접 배포&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#deploying-the-war-file-by-hand&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;deploying-the-war-file-by-hand&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;war 파일이 이미 있고 JBoss에 배포하려는 경우 &lt;/font&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;standalone/deployments&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 JBoss 설치 디렉터리로 이동하여&amp;nbsp; &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;거기에 파일을 붙여넣을&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포가 작동하는 두 가지 모드가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수동:&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; &amp;nbsp;배포 스캐너는 배포 폴더를 직접 모니터링하려고 시도하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 스캐너는 마커 파일에 의존합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자가 마커 파일을 추가하는 것은 스캐너가 콘텐츠를 배포하도록 지시하는 일종의 명령 역할을 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자동:&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 스캐너가 배포 폴더를 직접 모니터링하여 새 콘텐츠를 자동으로 배포하고 타임스탬프가 변경된 콘텐츠를 다시 배포합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;auto-deploy-zipped&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 속성 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;값을&amp;nbsp; &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;true&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 또는 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;false 로 설정하여 구성 파일 &lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;standalone.xml&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 모드를 지정할 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CKSej86L8v0CFQHTvQod9kYCdA&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;deployment-scanner&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;name&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;default&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;path&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;deployments&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;scan-enabled&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;true&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;scan-interval&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;5000&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;relative-to&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;jboss.server.base.dir&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;auto-deploy-zipped&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;true&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;deployment-timeout&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;60&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로 값은&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;true&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 배포 폴더에 war 파일을 배치할 때마다 자동으로 배포됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JBoss는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘텐츠가 배포되었음을 나타내는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.deployed 마커 파일을 자동으로 생성합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 새 war 파일을 배포 폴더에 복사하기 전에 이전 배포를 제거하면 JBoss는 배포가 제거되었음을 제안하는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.undeployed&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 마커 파일 을 생성합니다&amp;nbsp; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 배포를 시작하려면 마커 파일을 수동으로 삭제해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;auto-deploy-zipped&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 값이&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;false&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 설정된 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포를 시작하려면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.deployed&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 마커 파일을 수동으로 생성해야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-using-eclipse-to-deploy&quot; data-id=&quot;using-eclipse-to-deploy&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. Eclipse를 사용하여 배포&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#using-eclipse-to-deploy&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;using-eclipse-to-deploy&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Eclipse에서 동적 웹 프로젝트를 생성하고 JBoss 서버를 추가한 다음 서버에서 실행되도록 애플리케이션을 구성&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내부적으로 Eclipse는 애플리케이션의 war 파일을 생성하고 JBoss 디렉토리에 배치합니다. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;index.html 파일을 만들고 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;web.xml&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;welcome-file이&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이 파일 을 가리키도록 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설정할 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;응용 프로그램이 성공적으로 배포되었는지 테스트하기 위해 웹 브라우저를 시작하고 다음 형식으로 URL에 액세스할 수 있습니다.&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://localhost:&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; &amp;lt;portnumber&amp;gt;/&amp;lt;projectname&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CKWej86L8v0CFQHTvQod9kYCdA&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인덱스 페이지가 표시되면 애플리케이션이 성공적으로 배포된 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서는 배포 폴더로 작업하고 Eclipse를 사용하여 JBoss 서버에 war 파일을 배포하는 방법을 살펴보았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 자동 및 수동 배포 모드와 이들이 JBoss의 마커 파일과 함께 작동하는 방식에 대해서도 논의했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – REST with Spring (eBook) (everywhere)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner&quot;&gt; 
    &lt;img class=&quot;&quot; width=&quot;800&quot; height=&quot;360&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-main-1.2.0.jpg&quot; alt=&quot;SPRING으로 API 구축 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img class=&quot;&quot; width=&quot;300&quot; height=&quot;300&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-icn-1.0.0.png&quot; alt=&quot;SPRING으로 API 구축 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
        &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;
       &lt;br&gt;
       &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring으로&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; API를 구축하는 방법을 배우고 있습니까 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;?&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/rest-api-spring-guide&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/jboss-war-deploy&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1480</guid>
      <comments>https://recordsoflife.tistory.com/1480#entry1480comment</comments>
      <pubDate>Thu, 23 Mar 2023 21:52:19 +0900</pubDate>
    </item>
    <item>
      <title>WAR 파일을 Tomcat에 배포하는 방법</title>
      <link>https://recordsoflife.tistory.com/1479</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-Overview&quot; data-id=&quot;Overview&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Overview&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;a href=&quot;http://tomcat.apache.org/&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Apache Tomcat은&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Java 커뮤니티에서 가장 인기 있는 웹 서버 중 하나입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 확장이 있는 웹 아카이브를 제공할 수 있는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서블릿 컨테이너&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 제공됩니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컨테이너를 다시 시작하지 않고도 새 웹 애플리케이션을 배포하거나 기존 애플리케이션을 배포 취소할 수 있는 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;관리 대시보드를 제공합니다 . &lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이는 프로덕션 환경에서 특히 유용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 예제에서는 Tomcat에 대한 간략한 개요를 수행한 다음 WAR 파일 배포에 대한 다양한 접근 방식을 다룰 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  
 &lt;h2 id=&quot;bd-Structure&quot; data-id=&quot;Structure&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. 톰캣 구조&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Structure&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Structure&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시작하기 전에 몇 가지 용어와 환경 변수에 익숙해져야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-environment-variables&quot; data-id=&quot;1-environment-variables&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;환경 변수&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-environment-variables&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-environment-variables&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전에 Tomcat으로 작업한 적이 있다면 익숙할 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CISwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 변수는 서버가 설치된 디렉토리를 가리킵니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 변수는 특정 Tomcat 인스턴스의 디렉토리를 가리킵니다(여러 인스턴스가 설치되어 있을 수 있음).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_BASE&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 변수가 명시적으로 설정되지 않으면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 동일한 값이 할당됩니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CIWwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 응용 프로그램은 $CATALINA_HOME\webapps&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉터리 아래에 배포됩니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-terminology&quot; data-id=&quot;2-terminology&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;술어&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-terminology&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-terminology&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문서 루트 -&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; JSP 파일, HTML 페이지, Java 클래스 및 이미지와 같은 모든 응용 프로그램 리소스가 있는 웹 응용 프로그램의 최상위 디렉터리를 나타냅니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컨텍스트 경로 –&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 서버 주소에 상대적인 위치를 나타내며 웹 애플리케이션의 이름을 나타냅니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 웹 애플리케이션이 $CATALINA_HOME\webapps\myapp&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리 아래에 있는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;URL &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://localhost/myapp 로 액세스할 수 있으며 해당 컨텍스트 경로는 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/myapp&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR –&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 웹 아카이브의 약자. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 애플리케이션 디렉토리 계층 구조를 ZIP 형식으로 패키징하는 파일의 확장자입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 웹 응용 프로그램은 일반적으로 배포용 WAR 파일로 패키지됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 파일은 Eclipse와 같은 IDE를 사용하거나 명령줄에서 만들 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;CIawx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일을 배포한 후 Tomcat은 압축을 풀고 webapps&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉터리 의 모든 프로젝트 파일을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로젝트 이름을 딴 새 디렉터리에 저장합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-Setup&quot; data-id=&quot;Setup&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. 톰캣 설정&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Setup&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Setup&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat Apache 웹 서버는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://tomcat.apache.org/&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 사이트에서 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 할 수 있는 무료 소프트웨어입니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 시스템에 사용 가능한 JDK가 있고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAVA_HOME&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 환경 변수가 올바르게 설정되어 있어야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-start-tomcat&quot; data-id=&quot;1-start-tomcat&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;톰캣 시작&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-start-tomcat&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-start-tomcat&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME\bin\startup&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 있는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시작&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 스크립트를 실행하여 Tomcat 서버를 시작할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 설치에는 .bat&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.sh&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 가 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows 또는 Unix 기반 운영 체제를 사용하는지 여부에 따라 적절한 옵션을 선택합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-configure-roles&quot; data-id=&quot;2-configure-roles&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;역할 구성&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-configure-roles&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-configure-roles&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포 단계 동안 몇 가지 옵션이 있으며 그 중 하나는 Tomcat의 관리 대시보드를 사용하는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 대시보드에 액세스하려면 적절한 역할로 구성된 관리 사용자가 있어야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대시보드에 액세스하려면 admin 사용자에게 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;manager-gui&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 역할이 필요합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나중에 Maven을 사용하여 WAR 파일을 배포해야 하며 이를 위해 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;관리자 스크립트&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 역할도 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME\conf\tomcat-users&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 다음과 같이 변경해 보겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;role&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;rolename&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;manager-gui&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;role&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;rolename&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;manager-script&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;username&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;admin&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;password&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;roles&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;manager-gui, manager-script&quot;&lt;/span&gt;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 Tomcat 역할에 대한 자세한 내용은 이 공식 링크를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 따라 찾을 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-5&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_1&quot; name=&quot;baeldung_incontent_1&quot; data-google-query-id=&quot;CIGZzJuI8v0CFSmG6QUdWd8Ciw&quot;&gt; 
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_1_0__container__&quot; style=&quot;border: 0pt none;&quot;&gt;
    &lt;iframe id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_1_0&quot; name=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_1_0&quot; title=&quot;타사 광고 콘텐츠&quot; width=&quot;1086&quot; height=&quot;280&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot; role=&quot;region&quot; aria-label=&quot;광고&quot; tabindex=&quot;0&quot; style=&quot;border: 0px; vertical-align: bottom;&quot; data-load-complete=&quot;true&quot; data-google-container-id=&quot;5&quot;&gt;&lt;/iframe&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;h3 id=&quot;bd-3-set-directory-permissions&quot; data-id=&quot;3-set-directory-permissions&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.3. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디렉토리 권한 설정&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#3-set-directory-permissions&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;3-set-directory-permissions&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 Tomcat 설치 디렉터리에 대한 읽기/쓰기 권한이 있는지 확인합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-4-test-installation&quot; data-id=&quot;4-test-installation&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.4. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테스트 설치&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#4-test-installation&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;4-test-installation&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat이 제대로 설정되었는지 테스트하기 위해 시작 스크립트( &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;startup.bat&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; / &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;startup.sh&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; )를 실행합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘솔에 오류가 표시되지 않으면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://localhost:8080 을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 방문하여 다시 확인할 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 랜딩 페이지가 보이면 서버를 올바르게 설치한 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-5-resolve-port-conflict&quot; data-id=&quot;5-resolve-port-conflict&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.5. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;포트 충돌 해결&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#5-resolve-port-conflict&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;5-resolve-port-conflict&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로 Tomcat은 포트 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;8080&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 연결을 수신 대기하도록 설정되어 있습니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 포트에 이미 바인딩된 다른 애플리케이션이 있는 경우 시작 콘솔에서 알려줍니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;포트를 변경하려면 $CATALINA_HOME\conf\server.xml 에 있는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서버 구성 파일인 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;server.xml을 편집하면 됩니다 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로 커넥터 구성은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;Connector&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;port&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;8080&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;protocol&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;HTTP/1.1&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;connectionTimeout&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;20000&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;redirectPort&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;8443&quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 포트를 8081&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 변경하려면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;커넥터의 포트 속성을 변경해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;Connector&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;port&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;8081&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;protocol&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;HTTP/1.1&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;connectionTimeout&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;20000&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;redirectPort&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;8443&quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;때로는 선택한 포트가 기본적으로 열려 있지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 Unix 커널에서 적절한 명령으로 포트를 열거나 Windows에서 적절한 방화벽 규칙을 생성해야 합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 문서의 범위를 벗어나므로 여기서는 더 자세히 설명하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-Deploy&quot; data-id=&quot;Deploy&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. Maven에서 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Deploy&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Deploy&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 아카이브를 배포하기 위해 Maven을 사용하려면 Maven의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;settings.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일에서 Tomcat을 서버로 구성해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-6&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_2&quot; name=&quot;baeldung_incontent_2&quot; data-google-query-id=&quot;CIiwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;settings.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일을 찾을 수 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있는 위치는 두 곳입니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven 설치: &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;${maven.home}/conf/settings.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 설치: &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;${user.home}/.m2/settings.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt; 
  &lt;/ul&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;찾으면 Tomcat을 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;server&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;id&lt;/span&gt;&amp;gt;&lt;/span&gt;TomcatServer&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;id&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;username&lt;/span&gt;&amp;gt;&lt;/span&gt;admin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;username&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;password&lt;/span&gt;&amp;gt;&lt;/span&gt;password&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;password&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;server&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 배포를 테스트하기 위해 Maven에서 기본 웹 애플리케이션을 만들어야 합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션을 생성할 위치로 이동해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘솔에서 이 명령을 실행하여 새 Java 웹 애플리케이션을 생성합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-powershell hljs&quot;&gt;mvn archetype:generate &lt;span class=&quot;hljs-literal&quot;&gt;-DgroupId&lt;/span&gt;=com.baeldung &lt;span class=&quot;hljs-literal&quot;&gt;-DartifactId&lt;/span&gt;=tomcat&lt;span class=&quot;hljs-literal&quot;&gt;-war-deployment&lt;/span&gt; 
  &lt;span class=&quot;hljs-literal&quot;&gt;-DarchetypeArtifactId&lt;/span&gt;=maven&lt;span class=&quot;hljs-literal&quot;&gt;-archetype-webapp&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot;&gt;-DinteractiveMode&lt;/span&gt;=false&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게 하면 tomcat-war-deployment&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리에 완전한 웹 애플리케이션이 생성되고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;hello&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;world!&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지금 배포하고 브라우저를 통해 액세스한다면.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 그 전에 Maven 배포를 활성화하기 위해 한 가지 변경을 수행해야 합니다. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pom.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 이동하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 플러그인을 추가해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.apache.tomcat.maven&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;tomcat7-maven-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;2.2&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;url&lt;/span&gt;&amp;gt;&lt;/span&gt;http://localhost:8080/manager/text&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;url&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;server&lt;/span&gt;&amp;gt;&lt;/span&gt;TomcatServer&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;server&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;path&lt;/span&gt;&amp;gt;&lt;/span&gt;/myapp&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;path&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;특별한 변경 없이 버전 7과 8 모두에서 작동하기 때문에 Tomcat 7 플러그인을 사용하고 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구성 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;URL은&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 배포를 보내는 URL이며 Tomcat은 이를 사용하여 수행할 작업을 알 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;server 요소 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Maven이 인식하는 서버 인스턴스의 이름입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경로&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 요소는 배포의 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컨텍스트 경로를&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 정의합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-7&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_3&quot; name=&quot;baeldung_incontent_3&quot; data-google-query-id=&quot;CImwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즉, 배포가 성공하면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://localhost:8080/myapp 를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 눌러 웹 애플리케이션에 액세스합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 Maven에서 다음 명령을 실행할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 앱을 배포하려면:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn tomcat7:deploy&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 배포를 취소하려면 다음을 수행하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn tomcat7:undeploy&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 변경 후 재배포하려면 다음을 수행하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn tomcat7:redeploy&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-Cargo&quot; data-id=&quot;Cargo&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. Cargo 플러그인으로 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Cargo&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Cargo&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;a href=&quot;https://codehaus-cargo.github.io/cargo/Home.html&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Cargo&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는 다양한 유형의 애플리케이션 컨테이너를 표준 방식으로 조작할 수 있는 다목적 라이브러리입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-cargo-deployment-setup&quot; data-id=&quot;1-cargo-deployment-setup&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;화물 배치 설정&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-cargo-deployment-setup&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-cargo-deployment-setup&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 섹션에서는 WAR을 Tomcat에 배포하기 위해 Cargo의 Maven 플러그인을 사용하는 방법을 배웁니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 버전 7 인스턴스에 배포합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전체 프로세스를 확실하게 이해하기 위해 명령줄에서 새 Java 웹 애플리케이션을 생성하여 처음부터 시작하겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-8&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_4&quot; name=&quot;baeldung_incontent_4&quot; data-google-query-id=&quot;CIqwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_4_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn archetype:generate -DgroupId=com.baeldung -DartifactId=cargo-deploy &lt;font&gt;&lt;/font&gt;
  -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=&lt;span class=&quot;hljs-literal&quot;&gt;false&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러면 cargo-deploy&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리 에 완전한 자바 웹 애플리케이션이 생성됩니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 애플리케이션을 그대로 빌드, 배포 및 로드하면 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Hello World! &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;브라우저에서.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat7 Maven 플러그인과 달리 Cargo Maven 플러그인은 이 파일이 있어야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 애플리케이션에는 서블릿이 포함되어 있지 않으므로 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;web.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일은 매우 기본적입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새로 생성된 프로젝트의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 폴더 로 이동 하고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 내용으로 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;web.xml 파일을 생성합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;&amp;lt;?xml version=&lt;span class=&quot;hljs-string&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span class=&quot;hljs-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;web-app&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt; 
  &lt;span class=&quot;hljs-attr&quot;&gt;xmlns&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee&quot;&lt;/span&gt; 
    &lt;span class=&quot;hljs-attr&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&quot;&lt;/span&gt; 
        &lt;span class=&quot;hljs-attr&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;WebApp_ID&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;version&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot;&gt;&quot;3.0&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;display-name&lt;/span&gt;&amp;gt;&lt;/span&gt;cargo-deploy&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;display-name&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;welcome-file-list&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/span&gt;index.jsp&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;welcome-file&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;welcome-file-list&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;web-app&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven이 정규화된 이름을 입력하지 않고 Cargo의 명령을 인식할 수 있도록 하려면 Maven의 settings.xml에 있는 플러그인 그룹에 Cargo Maven 플러그인을 추가해야 합니다 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;루트 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;settings&amp;gt;&amp;lt;/settings&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 요소의 직계 자식으로 다음을 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;pluginGroups&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;pluginGroup&lt;/span&gt;&amp;gt;&lt;/span&gt;org.codehaus.cargo&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;pluginGroup&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;pluginGroups&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;h3 id=&quot;bd-2-local-deploy&quot; data-id=&quot;2-local-deploy&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로컬 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-local-deploy&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-local-deploy&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 하위 섹션에서는 새 배포 요구 사항에 맞게 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pom.xml을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 편집합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 플러그인을 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;build&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugins&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.codehaus.cargo&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;cargo-maven2-plugin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;1.5.0&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;container&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;containerId&lt;/span&gt;&amp;gt;&lt;/span&gt;tomcat7x&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;containerId&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;installed&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;home&lt;/span&gt;&amp;gt;&lt;/span&gt;Insert absolute path to tomcat 7 installation&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;home&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;container&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;existing&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;home&lt;/span&gt;&amp;gt;&lt;/span&gt;Insert absolute path to tomcat 7 installation&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;home&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
       &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;plugins&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;build&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작성 시점의 최신 버전은 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1.5.0&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 최신 버전은 항상 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://codehaus-cargo.github.io/cargo/Downloads.html&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 찾을 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-9&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_5&quot; name=&quot;baeldung_incontent_5&quot; data-google-query-id=&quot;CIuwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_5_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패키징을 WAR로 명시적으로 정의합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 없으면 빌드가 실패합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;플러그인 섹션에서 cargo maven2 플러그인을 추가할 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven에 Tomcat 컨테이너와 기존 설치를 사용하고 있음을 알리는 구성 섹션을 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컨테이너 유형을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;installed&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 설정하여 머신에 인스턴스가 설치되어 있음을 Maven에 알리고 이 설치에 대한 절대 URL을 제공합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구성 유형을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;existing&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 설정하면 사용 중인 기존 설정이 있고 추가 구성이 필요하지 않음을 Tomcat에 알립니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대안은 카고에게 URL을 제공하여 지정된 버전을 다운로드하고 설정하도록 지시하는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 우리의 초점은 WAR 배치에 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Maven 2.x를 사용하든 Maven 3.x를 사용하든 간에 cargo maven2 플러그인은 둘 다에 대해 작동한다는 점은 주목할 가치가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 다음을 실행하여 애플리케이션을 설치할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn install&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 배포합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn cargo:deploy&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 것이 순조롭게 진행된다면 http://localhost:8080/cargo-deploy를&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로드하여 웹 애플리케이션을 실행할 수 있어야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-10&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_6&quot; name=&quot;baeldung_incontent_6&quot; data-google-query-id=&quot;CIywx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_6_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;h3 id=&quot;bd-3-remote-deploy&quot; data-id=&quot;3-remote-deploy&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5.3. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원격 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#3-remote-deploy&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;3-remote-deploy&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원격 배포를 수행하려면 pom.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 구성 섹션만 변경하면 됩니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원격 배포는 Tomcat의 로컬 설치가 없지만 원격 서버의 관리자 대시보드에 액세스할 수 있음을 의미합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구성 섹션이 다음과 같이 보이도록 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pom.xml을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변경해 보겠습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-xml hljs&quot;&gt;&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;container&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;containerId&lt;/span&gt;&amp;gt;&lt;/span&gt;tomcat8x&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;containerId&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;remote&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;container&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;runtime&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;type&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;properties&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;cargo.remote.username&lt;/span&gt;&amp;gt;&lt;/span&gt;admin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;cargo.remote.username&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;cargo.remote.password&lt;/span&gt;&amp;gt;&lt;/span&gt;admin&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;cargo.remote.password&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot;&gt;cargo.tomcat.manager.url&lt;/span&gt;&amp;gt;&lt;/span&gt;http://localhost:8080/manager/text
              &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;cargo.tomcat.manager.url&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;properties&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;hljs-tag&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이번에는 컨테이너 유형을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설치됨 에서 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원격&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 변경 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 구성 유형을 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기존 에서 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;런타임&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 변경합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 구성에 인증 및 원격 URL 속성을 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전과 마찬가지로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;역할과 사용자가 이미 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME/conf/tomcat-users.xml 에 있는지 확인합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원격&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 배포를 위해 동일한 프로젝트를 편집하는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 기존 WAR의 배포를 취소합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn cargo:undeploy&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 프로젝트를 정리합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn clean&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음으로 설치합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn install&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 다음과 같이 배포합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-11&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_7&quot; name=&quot;baeldung_incontent_7&quot; data-google-query-id=&quot;CI2wx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_7_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;mvn cargo:deploy&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그게 다야.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-Eclipse&quot; data-id=&quot;Eclipse&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6. Eclipse에서 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Eclipse&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Eclipse&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Eclipse를 사용하면 IDE에서 벗어나 탐색하지 않고도 일반 워크플로에서 웹 프로젝트 배포를 추가하기 위해 서버를 내장할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-embed-tomcat-in-eclipse&quot; data-id=&quot;1-embed-tomcat-in-eclipse&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Eclipse에 Tomcat 포함&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-embed-tomcat-in-eclipse&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-embed-tomcat-in-eclipse&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Eclipse에 설치를 포함하려면 작업 표시줄에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;창&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메뉴 항목을 선택한 다음 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;드롭다운에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;환경 설정을 선택합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러면 나타나는 창의 왼쪽 패널에 기본 설정 항목의 트리 그리드가 표시됩니다. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음으로 eclipse -&amp;gt; 서버&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 이동하거나 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;검색 표시줄에 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서버를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입력합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 아직 열려 있지 않은 경우 설치 디렉토리를 선택하고 다운로드한 Tomcat 버전을 선택할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패널 오른쪽에 구성 페이지가 나타납니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에서 사용 옵션을 선택하여 이 서버 버전을 활성화하고 설치 폴더를 찾습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture1.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; class=&quot;wp-image-22891 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture1-300x229.png&quot; alt=&quot;캡처1&quot; width=&quot;476&quot; height=&quot;363&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture1-300x229.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture1.png 689w&quot; sizes=&quot;(max-width: 476px) 100vw, 476px&quot;&gt;&lt;/a&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;변경 사항을 적용한 다음 다음에 Eclipse &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;창 -&amp;gt; 보기&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하위 메뉴 표시에서 서버 보기를 열면 새로 구성된 서버가 나타나며 애플리케이션을 시작, 중지 및 배포할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-deploy-web-application-in-embedded-tomcat&quot; data-id=&quot;2-deploy-web-application-in-embedded-tomcat&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Embedded Tomcat에 웹 애플리케이션 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-deploy-web-application-in-embedded-tomcat&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-deploy-web-application-in-embedded-tomcat&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat에 웹 애플리케이션을 배포하려면 작업 공간에 웹 애플리케이션이 있어야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-12&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_8&quot; name=&quot;baeldung_incontent_7&quot; data-google-query-id=&quot;CI6wx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_7_1__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;창 -&amp;gt; 보기 표시&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서버&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 보기를 열고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&amp;nbsp;서버를 찾아봅시다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;열리면 구성한 서버를 마우스 오른쪽 버튼으로 클릭하고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나타나는 상황에 맞는 메뉴에서 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포 추가를 선택할 수 있습니다.&lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture-1-1-2.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; loading=&quot;lazy&quot; class=&quot;wp-image-22893 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture-1-1-2-300x105.png&quot; alt=&quot;캡처-1-1-2&quot; width=&quot;609&quot; height=&quot;213&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-1-2-300x105.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-1-2-768x270.png 768w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-1-2-1024x360.png 1024w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-1-2.png 1085w&quot; sizes=&quot;(max-width: 609px) 100vw, 609px&quot;&gt;&lt;/a&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;표시되는 새 배포&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 대화 상자 에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로젝트&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 드롭다운을 열고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 프로젝트를 선택합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로젝트&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 콤보 상자 아래에 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포 유형&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 섹션이 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Exploded Archive(development mode) 를&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 선택 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하면 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;응용 프로그램의 변경 사항이 다시 배포하지 않고도 실시간으로 동기화됩니다. &lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 매우 효율적이기 때문에 개발 중에 가장 좋은 옵션입니다.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture-2-1-2.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; loading=&quot;lazy&quot; class=&quot;wp-image-22894 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture-2-1-2-300x288.png&quot; alt=&quot;캡처-2-1-2&quot; width=&quot;455&quot; height=&quot;437&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture-2-1-2-300x288.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-2-1-2.png 579w&quot; sizes=&quot;(max-width: 455px) 100vw, 455px&quot;&gt;&lt;/a&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Packaged Archive(프로덕션 모드)를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 선택하면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;변경 사항을 적용하고 브라우저에서 확인할 때마다 다시 배포해야 합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 프로덕션에만 가장 적합하지만 여전히 Eclipse를 사용하면 똑같이 쉽게 만들 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-3-deploy-web-application-in-external-location&quot; data-id=&quot;3-deploy-web-application-in-external-location&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6.3. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;외부 위치에 웹 애플리케이션 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#3-deploy-web-application-in-external-location&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;3-deploy-web-application-in-external-location&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리는 일반적으로 디버깅을 더 쉽게 하기 위해 Eclipse를 통해 WAR을 배포하도록 선택합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 Eclipse의 임베디드 서버에서 사용하는 위치가 아닌 다른 위치에 배포해야 할 때가 올 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가장 일반적인 인스턴스는 프로덕션 서버가 온라인 상태이고 웹 애플리케이션을 업데이트하려는 경우입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로덕션 모드에서 배포하고 새 배포&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 대화 상자 에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포 위치를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 확인한 다음 거기에서 WAR을 선택하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 절차를 건너뛸 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-13&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_9&quot; name=&quot;baeldung_incontent_7&quot; data-google-query-id=&quot;CI-wx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_7_2__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포하는 동안 내장형 서버를 선택하는 대신 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내장형 서버 List 옆에 있는 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서버 보기에서 &lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&amp;lt;외부 실행&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 옵션을 선택할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 외부 Tomcat 설치의 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;webapps&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리 로 이동합니다 .&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-IntelliJ&quot; data-id=&quot;IntelliJ&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7. IntelliJ IDEA에서 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#IntelliJ&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;IntelliJ&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 응용 프로그램을 Tomcat에 배포하려면 웹 응용 프로그램이 존재해야 하며 이미 다운로드 및 설치되어 있어야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-local-configuration&quot; data-id=&quot;1-local-configuration&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로컬 구성&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-local-configuration&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-local-configuration&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실행&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 메뉴를 열고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구성 편집&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 옵션을 클릭합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; loading=&quot;lazy&quot; class=&quot;wp-image-22895 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture-300x170.png&quot; alt=&quot;포착&quot; width=&quot;422&quot; height=&quot;239&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture-300x170.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture.png 413w&quot; sizes=&quot;(max-width: 422px) 100vw, 422px&quot;&gt;&lt;/a&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;왼쪽 패널에서 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 서버를 검색합니다. &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;없는 경우 메뉴에서 + 기호를 클릭하고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat을 검색한 다음 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Local 을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 선택합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이름 필드에 Tomcat 7/8을&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입력합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(버전에 따라 다름).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture-1-2.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; loading=&quot;lazy&quot; class=&quot;wp-image-22897 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture-1-2-300x300.png&quot; alt=&quot;캡처-1-2&quot; width=&quot;427&quot; height=&quot;427&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-2-300x300.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-2-150x150.png 150w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-2-125x125.png 125w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-1-2.png 507w&quot; sizes=&quot;(max-width: 427px) 100vw, 427px&quot;&gt;&lt;/a&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 구성...&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 버튼을 클릭 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 홈&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 필드에서 설치의 홈 위치로 이동하여 선택합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-14&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_10&quot; name=&quot;baeldung_incontent_7&quot; data-google-query-id=&quot;CJCwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_7_3__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture-2.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; loading=&quot;lazy&quot; class=&quot;wp-image-22896 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture-2-300x174.png&quot; alt=&quot;캡처-2&quot; width=&quot;571&quot; height=&quot;331&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture-2-300x174.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-2-768x447.png 768w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-2.png 865w&quot; sizes=&quot;(max-width: 571px) 100vw, 571px&quot;&gt;&lt;/a&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;선택적으로 시작 페이지를 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://localhost:8080/&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;HTTP 포트: 8080&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설정할 수 있습니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;포트를 적절하게 변경합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 배포&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 탭 으로 이동하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;+ 기호를 클릭하고 서버에 추가할 아티팩트를 선택한 다음 확인을 클릭합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
 &lt;a href=&quot;/wp-content/uploads/2016/09/Capture-3-1.png&quot; target=&quot;_blank&quot;&gt;&lt;img decoding=&quot;async&quot; loading=&quot;lazy&quot; class=&quot;wp-image-22899 aligncenter&quot; src=&quot;/wp-content/uploads/2016/09/Capture-3-1-300x111.png&quot; alt=&quot;캡처-3-1&quot; width=&quot;500&quot; height=&quot;185&quot; srcset=&quot;https://www.baeldung.com/wp-content/uploads/2016/09/Capture-3-1-300x111.png 300w, https://www.baeldung.com/wp-content/uploads/2016/09/Capture-3-1.png 628w&quot; sizes=&quot;(max-width: 500px) 100vw, 500px&quot;&gt;&lt;/a&gt; 
  &lt;p&gt;&amp;nbsp;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-remote-configuration&quot; data-id=&quot;2-remote-configuration&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원격 구성&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-remote-configuration&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-remote-configuration&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로컬 Tomcat 구성과 동일한 지침을 따르지만 서버 탭에서 원격 설치 위치를 입력해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-Copying&quot; data-id=&quot;Copying&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;8. 아카이브를 복사하여 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Copying&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Copying&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Eclipse에서 WAR을 내보내는 방법을 배웠습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리가 할 수 있는 또 다른 일은 Tomcat 인스턴스의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;$CATALINA_HOME\webapps&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리 에 간단히 드롭하여 배포하는 것입니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인스턴스가 실행 중인 경우 Tomcat이 아카이브의 압축을 풀고 해당 컨텍스트 경로를 구성하는 즉시 배포가 시작됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인스턴스가 실행 중이 아니면 서버는 다음에 시작할 때 프로젝트를 배포합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-Manager&quot; data-id=&quot;Manager&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;9. Tomcat 관리자에서 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Manager&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Manager&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일이 이미 있고 관리 대시보드를 사용하여 배포하려는 경우 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://localhost:8080/manager를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 방문하여 관리자 대시보드에 액세스할 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-15&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __336x280&quot; id=&quot;baeldung_incontent_11&quot; name=&quot;baeldung_incontent_7&quot; data-google-query-id=&quot;CJGwx5uI8v0CFSmG6QUdWd8Ciw&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_incontent_7_4__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대시보드에는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Manager&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Applications&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Deploy&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Diagnostics&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Server Information의 다섯 가지 섹션이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 섹션 으로 이동하면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 개의 하위 섹션이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-1-deploy-directory-or-war-file-located-on-server&quot; data-id=&quot;1-deploy-directory-or-war-file-located-on-server&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;9.1. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서버에 있는 디렉터리 또는 WAR 파일 배포&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#1-deploy-directory-or-war-file-located-on-server&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;1-deploy-directory-or-war-file-located-on-server&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일이 Tomcat 인스턴스가 실행 중인 서버에 있는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;슬래시 &quot;/&quot; 앞에 오는 필수 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컨텍스트 경로 필드를 채울 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 URL이 http://localhost:8080/myapp&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 인 브라우저에서 웹 애플리케이션에 액세스하려는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경우 컨텍스트 경로 필드에는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/myapp이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XML 구성 파일 URL 필드를 건너뛰고 &lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 또는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디렉터리 URL&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 필드 로 이동할 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수도 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기서는 서버에 표시되는 웹 아카이브 파일의 절대 URL을 입력합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 파일 위치가 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C:/apps/myapp.war&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 인 경우 이 위치를 입력합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 확장을 잊지 않는 것이 중요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 버튼을 클릭할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;페이지가 다시 로드되고 페이지 상단에 다음 메시지가 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-plaintext hljs&quot;&gt;OK - Deployed application at context path /myapp&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션은 페이지의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 섹션 에도 나타나야 합니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h3 id=&quot;bd-2-war-file-to-deploy&quot; data-id=&quot;2-war-file-to-deploy&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;9.2. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포할 WAR 파일&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#2-war-file-to-deploy&quot;&gt;&lt;/a&gt;&lt;/h3&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;2-war-file-to-deploy&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에서는 파일 선택&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 버튼을 클릭 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 WAR 파일의 위치로 이동하여 선택한 다음 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 버튼을 클릭합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 경우 모두 모든 것이 순조롭게 진행되면 Tomcat 콘솔은 다음 메시지와 함께 배포가 성공했음을 알려줍니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-plaintext hljs&quot;&gt;INFO: Deployment of web application archive \path\to\deployed_war has finished in 4,833 ms&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-Conclusion&quot; data-id=&quot;Conclusion&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;10. 결론&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#Conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;Conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서는 WAR을 Tomcat 서버에 배포하는 방법에 중점을 두었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – REST with Spring (eBook) (everywhere)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner&quot;&gt; 
    &lt;img class=&quot;&quot; width=&quot;800&quot; height=&quot;360&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-main-1.2.0.jpg&quot; alt=&quot;SPRING으로 API 구축 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img class=&quot;&quot; width=&quot;300&quot; height=&quot;300&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-icn-1.0.0.png&quot; alt=&quot;SPRING으로 API 구축 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
        &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;
       &lt;br&gt;
       &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring으로&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; API를 구축하는 방법을 배우고 있습니까 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;?&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/rest-api-spring-guide&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/tomcat-deploy-war&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1479</guid>
      <comments>https://recordsoflife.tistory.com/1479#entry1479comment</comments>
      <pubDate>Thu, 23 Mar 2023 21:50:23 +0900</pubDate>
    </item>
    <item>
      <title>WAR과 EAR 파일의 차이점</title>
      <link>https://recordsoflife.tistory.com/1478</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-overview&quot; data-id=&quot;overview&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 개요&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;overview&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 사용방법(예제)에서는 Java JAR(Java ARchive), WAR(Web Application ARchive) 및 EAR(Enterprise Application aRchive) 아티팩트 파일 간의 차이점을 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;각 파일 형식이 수행하는 작업과 이를 사용하는 방법에 대해 설명합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-java-artifact-file-formats&quot; data-id=&quot;java-artifact-file-formats&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. 자바 아티팩트 파일 형식&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#java-artifact-file-formats&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;java-artifact-file-formats&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 사양에는 여러 유형의 아티팩트 파일이 포함되어 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가장 눈에 띄는 것은 JAR, WAR 및 EAR이지만 다른 것들도 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR로 시작하여 각 유형은 각각 다른 유형을 기반으로 빌드됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR 파일 형식은 JavaSE 사양의 일부이지만 WAR 및 EAR 파일 자체는 현재 JakartaEE로 알려진 JavaEE의 일부입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-jar-files&quot; data-id=&quot;jar-files&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. JAR 파일&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#jar-files&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;jar-files&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아시 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다시피 JAR 파일은 Java 애플리케이션의 기본 아티팩트입니다&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CMO5jOCH8v0CFXeG6QUdUTYAgA&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로 확장자는 .jar&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 인 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.zip&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일 입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;클래스, 리소스, 메타 정보 파일 등의 내용을 포함합니다.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jar&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 프로그램 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;으로 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/java-create-jar&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR 파일을 만들고&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;/java-create-jar#running&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; JRE(Java Runtime Environment)만 있는 모든 시스템에서 &lt;/font&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;java -jar&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 명령을 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하여 &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;a href=&quot;/java-create-jar#running&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실행할&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 수 있습니다.&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-war-files&quot; data-id=&quot;war-files&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 전쟁 파일&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#war-files&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;war-files&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/strong&gt; &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일은 Java 웹 애플리케이션 번들링 &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 사용됩니다&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;후드 아래의 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.zip 파일이며 JAR 파일 형식의 확장입니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;/jsp&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;클래스 및 리소스와 함께 WAR 파일에는 라이브러리, JSP 파일&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/intro-to-servlets&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 서블릿&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 모든 유형의 정적 웹 파일&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (HTML, CSS, Javascript 등) &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;형식의 다른 JAR이 포함될 수 있습니다 .&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CMS5jOCH8v0CFXeG6QUdUTYAgA&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JakartaEE는 올바른 형식의 WAR 파일이 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;web.xml&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 파일을 포함하는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WEB-INF&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 디렉토리를 포함해야 한다고 지정합니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에서 각 서블릿의 웹 경로 또는 세션 시간 초과 양과 같은 웹 응용 프로그램의 구조 및 구성을 선언합니다.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR과 달리 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일은 독립 실행형 애플리케이션으로 실행할 수 없으며 서블릿 컨테이너 또는 애플리케이션 서버와 같은 다른 애플리케이션의 구성 요소로만 사용할 수 있습니다&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR 파일을 서버에 넣는 과정을 애플리케이션 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/tomcat-deploy-war&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배포&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 라고 합니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반적인 애플리케이션 서버에는 Tomcat, Jetty 및 Wildfly가 포함됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-ear-files&quot; data-id=&quot;ear-files&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5. 귀 파일&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#ear-files&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;ear-files&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;EAR 파일은 여러 모듈로 구성된 엔터프라이즈 애플리케이션에 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여러 유형의 모듈이 있지만 가장 일반적인 것은 웹 모듈(기본적으로 WAR 파일)과 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Enterprise Java Bean 클래스를 포함하는 JAR 파일의 특수 유형인 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;/ejb-intro&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;EJB 모듈 입니다.&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-4&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_3&quot; name=&quot;baeldung_leaderboard_mid_3&quot; data-google-query-id=&quot;CMW5jOCH8v0CFXeG6QUdUTYAgA&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_3_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR과 마찬가지로 EAR은 JAR 확장이며 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;루트 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;META-INF 디렉토리 아래에 &lt;/font&gt;&lt;/em&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;application.xml&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이라는 특수 XML 파일을 포함해야 합니다 . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 파일에서는 엔터프라이즈 애플리케이션을 설명하고 해당 모듈을 나열합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 전체 앱에 대한 Security 역할을 추가할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WAR과 마찬가지로 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;EAR 파일도 독립 실행형 애플리케이션으로 실행할 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플리케이션 서버에 배포해야 합니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 이 경우 모든 유형이 호환되는 것은 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Wildfly와 같은 JakartaEE 기술을 지원하는 서버를 사용해야 하지만 Jetty는 사용할 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat의 경우에도 호환되지 않지만 호환되는 TomEE라는 다른 버전이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;EAR 형식의 장점은 복잡한 다중 구성 요소 응용 프로그램을 단일 파일에 지정할 수 있다는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 공통 리소스를 공유하여 중복을 방지할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 단일 파일 형식은 배포 오류를 제거하므로 매우 유용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사에서는 WAR과 EAR 파일의 차이점을 살펴보았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리는 각 파일의 구조를 배웠고 일반적인 사용 사례에 대해 논의했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 각 유형의 아티팩트를 사용하는 방법을 살펴보았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – REST with Spring (eBook) (everywhere)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner&quot;&gt; 
    &lt;img class=&quot;&quot; width=&quot;800&quot; height=&quot;360&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-main-1.2.0.jpg&quot; alt=&quot;SPRING으로 API 구축 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img class=&quot;&quot; width=&quot;300&quot; height=&quot;300&quot; src=&quot;/wp-content/uploads/2016/05/baeldung-rest-post-footer-icn-1.0.0.png&quot; alt=&quot;SPRING으로 API 구축 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div&gt;
        &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;
       &lt;br&gt;
       &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Spring으로&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; API를 구축하는 방법을 배우고 있습니까 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;?&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/rest-api-spring-guide&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/war-vs-ear-files&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1478</guid>
      <comments>https://recordsoflife.tistory.com/1478#entry1478comment</comments>
      <pubDate>Thu, 23 Mar 2023 21:35:12 +0900</pubDate>
    </item>
    <item>
      <title>Mockito 2를 사용한 지연 검증</title>
      <link>https://recordsoflife.tistory.com/1477</link>
      <description>&lt;section class=&quot;post-content clearfix&quot; itemprop=&quot;articleBody&quot;&gt; 
 &lt;h2 id=&quot;bd-introduction&quot; data-id=&quot;introduction&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1. 소개&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#introduction&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;introduction&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 짧은 예제에서는 Mockito의 지연 검증을 살펴보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;빠른 실패 대신 Mockito를 사용하면 테스트가 끝날 때 수집되고 보고된 모든 결과를 볼 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
 &lt;h2 id=&quot;bd-maven-dependencies&quot; data-id=&quot;maven-dependencies&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2. 메이븐 의존성&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#maven-dependencies&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;maven-dependencies&quot;&gt;&lt;/div&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://search.maven.org/classic/#search%7Cgav%7C1%7Cg%3A%22org.mockito%22%20AND%20a%3A%22mockito-core%22&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mockito&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의존성을 추가하여 시작하겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&amp;lt;dependency&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;groupId&amp;gt;org.mockito&amp;lt;/groupId&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;artifactId&amp;gt;mockito-core&amp;lt;/artifactId&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;version&amp;gt;&lt;span class=&quot;hljs-number&quot;&gt;2.21&lt;/span&gt;&lt;span class=&quot;hljs-number&quot;&gt;.0&lt;/span&gt;&amp;lt;/version&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-lazy-verification&quot; data-id=&quot;lazy-verification&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3. Lazy 검증&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#lazy-verification&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;lazy-verification&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mockito의 기본 동작은 첫 번째 실패에서 즉 열심히 중지하는 것입니다 . 이 접근 방식은 &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;fail-fast&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 라고도 합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;때로는 이전 실패에 관계없이 모든 검증을 실행하고 보고해야 할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-2&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__336x280 __728x90&quot; id=&quot;baeldung_leaderboard_mid_1&quot; name=&quot;baeldung_leaderboard_mid_1&quot; data-google-query-id=&quot;CMWezqyH8v0CFYbLfAodms4Mew&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_1_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;VerificationCollector&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는 테스트 메서드의 모든 검증을 수집하는 JUnit 규칙입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;오류가 있는 경우 테스트가 끝날 때 실행되고 보고됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hljs-title class_&quot;&gt;LazyVerificationTest&lt;/span&gt; {&lt;font&gt;&lt;/font&gt;
 &lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-meta&quot;&gt;@Rule&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-type&quot;&gt;VerificationCollector&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;verificationCollector&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; MockitoJUnit.collector();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    &lt;span class=&quot;hljs-comment&quot;&gt;// ...&lt;/span&gt;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 테스트를 추가해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-java hljs&quot;&gt;&lt;span class=&quot;hljs-meta&quot;&gt;@Test&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot;&gt;testLazyVerification&lt;/span&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;throws&lt;/span&gt; Exception {
    &lt;span class=&quot;hljs-type&quot;&gt;List&lt;/span&gt; &lt;span class=&quot;hljs-variable&quot;&gt;mockList&lt;/span&gt; &lt;span class=&quot;hljs-operator&quot;&gt;=&lt;/span&gt; mock(ArrayList.class);&lt;font&gt;&lt;/font&gt;
    &lt;font&gt;&lt;/font&gt;
    verify(mockList).add(&lt;span class=&quot;hljs-string&quot;&gt;&quot;one&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
    verify(mockList).clear();&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 테스트가 실행되면 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 검증의 실패가 모두 보고됩니다&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;org.mockito.exceptions.base.MockitoAssertionError: There were multiple verification failures:&lt;font&gt;&lt;/font&gt;
1. Wanted but not invoked:&lt;font&gt;&lt;/font&gt;
arrayList.add(&lt;span class=&quot;hljs-string&quot;&gt;&quot;one&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
-&amp;gt; at com.baeldung.mockito.java8.LazyVerificationTest.testLazyVerification(LazyVerificationTest.java:21)&lt;font&gt;&lt;/font&gt;
Actually, there were zero interactions with this mock.&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
2. Wanted but not invoked:&lt;font&gt;&lt;/font&gt;
arrayList.clear();&lt;font&gt;&lt;/font&gt;
-&amp;gt; at com.baeldung.mockito.java8.LazyVerificationTest.testLazyVerification(LazyVerificationTest.java:22)&lt;font&gt;&lt;/font&gt;
Actually, there were zero interactions with this mock.&lt;/code&gt;&lt;/pre&gt; 
  &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;VerificationCollector&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 규칙이 없으면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;첫 번째 확인만 보고됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
 &lt;div class=&quot;code-block code-block-3&quot; style=&quot;margin: 8px 0; clear: both;&quot;&gt; 
  &lt;div align=&quot;center&quot; data-freestar-ad=&quot;__300x250 __336x280&quot; id=&quot;baeldung_leaderboard_mid_2&quot; name=&quot;baeldung_leaderboard_mid_2&quot; data-google-query-id=&quot;CMaezqyH8v0CFYbLfAodms4Mew&quot;&gt;  
   &lt;div id=&quot;google_ads_iframe_/15184186,7114245/baeldung_leaderboard_mid_2_0__container__&quot; style=&quot;border: 0pt none; width: 88px; height: 0px;&quot;&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt; 
 &lt;pre class=&quot;hljs-copy-wrapper&quot; style=&quot;--hljs-theme-background:rgb(250, 250, 250);&quot;&gt;&lt;code class=&quot;language-bash hljs&quot;&gt;Wanted but not invoked:&lt;font&gt;&lt;/font&gt;
arrayList.add(&lt;span class=&quot;hljs-string&quot;&gt;&quot;one&quot;&lt;/span&gt;);&lt;font&gt;&lt;/font&gt;
-&amp;gt; at com.baeldung.mockito.java8.LazyVerificationTest.testLazyVerification(LazyVerificationTest.java:19)&lt;font&gt;&lt;/font&gt;
Actually, there were zero interactions with this mock.&lt;/code&gt;&lt;/pre&gt; 
 &lt;h2 id=&quot;bd-conclusion&quot; data-id=&quot;conclusion&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4. 결론&lt;/font&gt;&lt;/font&gt;&lt;a class=&quot;anchor-link&quot; href=&quot;#conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt; 
  &lt;div class=&quot;bd-anchor&quot; id=&quot;conclusion&quot;&gt;&lt;/div&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mockito에서 지연 검증을 사용하는 방법을 간단히 살펴보았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 항상 그렇듯이 코드 샘플은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/eugenp/tutorials/tree/master/testing-modules/mockito&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GitHub 에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 찾을 수 있습니다 .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;div data-sticky-weight=&quot;1&quot; data-height-limit=&quot;0&quot; data-stickyness=&quot;sticky&quot; style=&quot;margin-top:0em;margin-bottom:0em;&quot; class=&quot;widget_text after-post-banner-widget&quot;&gt;
   &lt;span style=&quot;display:none;&quot;&gt;res – Junit (guide) (cat=Testing)&lt;/span&gt;
  &lt;div class=&quot;textwidget custom-html-widget&quot;&gt; 
   &lt;div class=&quot;footer-html-banner footer-cloud-banner&quot;&gt; 
    &lt;img style=&quot;width: 300px&quot; src=&quot;wp-content/uploads/2019/10/JUnit5-Cover-Mockup.png&quot; alt=&quot;JUnit 5 시작하기 - 책 표지&quot; loading=&quot;lazy&quot;&gt; 
    &lt;div class=&quot;header-row&quot;&gt; 
     &lt;div class=&quot;image-col&quot;&gt; 
      &lt;img src=&quot;wp-content/uploads/2018/07/JUnit5-Icon-1.png&quot; alt=&quot;JUnit 5 시작하기 - 아이콘&quot; loading=&quot;lazy&quot;&gt; 
      &lt;/div&gt; 
     &lt;div class=&quot;text-col&quot;&gt; 
      &lt;div class=&quot;smaller&quot;&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;퀵 사용방법(예제) 받기 및&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt;
      &lt;div class=&quot;bigger&quot;&gt;
       &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JUnit 5 활용&lt;/font&gt;&lt;/font&gt;
       &lt;/div&gt; 
      &lt;a class=&quot;optin&quot; href=&quot;/junit5-migration-guide&quot;&gt;&lt;span class=&quot;optin-button&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자책 다운로드&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/a&gt; 
      &lt;/div&gt; 
     &lt;/div&gt; 
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt; 
&lt;/section&gt;
 참고 &lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
   &lt;li&gt;https://docs.spring.io/spring-framework/docs/current/reference/html&lt;/li&gt;
   &lt;li&gt;https://www.baeldung.com/mockito-lazy-verification&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Spring</category>
      <category>#java #spring</category>
      <author>기록만이살길</author>
      <guid isPermaLink="true">https://recordsoflife.tistory.com/1477</guid>
      <comments>https://recordsoflife.tistory.com/1477#entry1477comment</comments>
      <pubDate>Thu, 23 Mar 2023 21:33:06 +0900</pubDate>
    </item>
  </channel>
</rss>