<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>lahuman &amp;amp; jabsiri 노트</title>
    <link>https://lahuman2study.tistory.com/</link>
    <description>lahuman 과 jabsiri가 함께 쓰는 공개 노트 입니다.

유용한 정보를 많이 기입하려고 노력 중입니다. 감사합니다.</description>
    <language>ko</language>
    <pubDate>Sun, 17 May 2026 00:33:04 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>lahuman</managingEditor>
    <image>
      <title>lahuman &amp;amp; jabsiri 노트</title>
      <url>https://t1.daumcdn.net/cfile/tistory/222423395404118213</url>
      <link>https://lahuman2study.tistory.com</link>
    </image>
    <item>
      <title>JPA 에서 FLUSH 처리시 실행 순서</title>
      <link>https://lahuman2study.tistory.com/446</link>
      <description>&lt;h1 id=&quot;hibernate는-연관된-엔터티-상태-작업의-순서대로-sql-문을-실행하지-않습니다&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;Hibernate는 연관된 엔터티 상태 작업의 순서대로 SQL 문을 실행하지 않습니다.&lt;/h1&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;다음과 같은 코드가 있다고 예상할 경우&lt;/p&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;haxe&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;Person person = entityManager.find(Person.class, 1L);
entityManager.remove(person);

Person newPerson = new Person();
newPerson.setId(2L);
newPerson.setName(&quot;John Doe&quot;);
entityManager.persist(newPerson);
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;저희는 DELETE 질의 이후 INSERT 질의를 기대 합니다.&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;하지만 동작은 아래와 같습니다.&lt;/p&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;sql&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;INSERT INTO Person (name, id)
VALUES ('John Doe', 2L)

DELETE FROM Person WHERE id = 1
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;SQL 문이 실행되는 순서는 엔티티의 상태 변화가 아닌,&lt;span&gt;&amp;nbsp;&lt;/span&gt;ActionQueue에 의해서 지정됩니다.&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;ActionQueue에서는 다음 순서로 모든 작업을 실행합니다 .&lt;/p&gt;
&lt;ol style=&quot;list-style-type: decimal; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;OrphanRemovalAction&lt;/li&gt;
&lt;li&gt;EntityInsertAction또는EntityIdentityInsertAction&lt;/li&gt;
&lt;li&gt;EntityUpdateAction&lt;/li&gt;
&lt;li&gt;QueuedOperationCollectionAction&lt;/li&gt;
&lt;li&gt;CollectionRemoveAction&lt;/li&gt;
&lt;li&gt;CollectionUpdateAction&lt;/li&gt;
&lt;li&gt;CollectionRecreateAction&lt;/li&gt;
&lt;li&gt;EntityDeleteAction&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;만약, 꼭 삭제를 먼저 실행하고 싶다면 다음과 같이 강제로 flush를 호출 해야 합니다.&lt;/p&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;haxe&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;Person person = entityManager.find(Person.class, 1L);
entityManager.remove(person);
entityManager.flush(); // 강제 flush로 SQL 실행 

Person newPerson = new Person();
newPerson.setId(2L);
newPerson.setName(&quot;John Doe&quot;);
entityManager.persist(newPerson);
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;마치며&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;마치며&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이 부분을 잘 이해 못해서 삽질을 오래 하였습니다.&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;강제로 flush 하기 보다&lt;span&gt;&amp;nbsp;&lt;/span&gt;OrphanRemovalAction&lt;span&gt;&amp;nbsp;&lt;/span&gt;를 활용하여 처리 하는게 좋게 보여지기도 합니다.&lt;/p&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#flushing-order&quot;&gt;6.5. Flush operation order&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>설치&amp;amp;설정 관련/Spring Framework</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/446</guid>
      <comments>https://lahuman2study.tistory.com/446#entry446comment</comments>
      <pubDate>Fri, 30 Aug 2024 18:26:26 +0900</pubDate>
    </item>
    <item>
      <title>Python 3.12 설치시 Openssl 모듈 버전 확인이 필요 합니다.</title>
      <link>https://lahuman2study.tistory.com/445</link>
      <description>&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;Python 3.12을 설치할 때 발생할 수 있는 오류 중 하나는 SSL 인증서와 관련된 문제입니다. 특히, pip 설치 시 다음과 같은 오류를 만날 수 있습니다:&lt;/p&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;livecodeserver&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(&quot;Can't connect to HTTPS URL because the SSL module is not available.&quot;)) - skipping
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이 오류는 Python 설치 시 SSL 모듈이 제대로 구성되지 않았기 때문에 발생합니다. Python 3.12 설치 후 SSL 모듈이 제대로 작동하는지 확인하는 것이 중요합니다.&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;다음은 AWSLinux 기반의 Docker Container 설치시 명령어입니다.&lt;/p&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;dockerfile&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;from amazonlinux # 1

RUN  yum update --security --bugfix -y # 2

RUN yum groupinstall &quot;Development Tools&quot; -y # 3
RUN yum install openssl11 openssl11-devel  libffi-devel bzip2-devel wget -y # 3 + opnessl 1.1.1 설치
# 4
WORKDIR /usr/src
RUN wget https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz 
RUN  tar xzf Python-3.12.2.tgz 

# 5 
WORKDIR /usr/src/Python-3.12.2
RUN ./configure --enable-optimizations
RUN make -j 8
RUN make altinstall

RUN python3.12 --version # 6

# 7
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3.12 get-pip.py  --trusted-host=files.pythonhosted.org --trusted-host=pypi.org
RUN pip3.12 --version

# 8 
RUN ln -s /usr/local/bin/python3.12 /usr/bin/python3 &amp;amp; \
    ln -s /usr/local/bin/pip3 /usr/bin/pip3

# 9
# datetime zone setting
RUN date
RUN mv /etc/localtime /etc/localtime_org
RUN ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime
RUN date

&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;dockerfile은-다음-작업을-수행합니다&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;Dockerfile은 다음 작업을 수행합니다&lt;/h2&gt;
&lt;ol style=&quot;list-style-type: decimal; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;Amazon Linux 이미지를 사용하여 Docker 컨테이너를 생성합니다.&lt;/li&gt;
&lt;li&gt;보안 및 버그 수정 업데이트를 수행합니다.&lt;/li&gt;
&lt;li&gt;개발 도구 및 필요한 라이브러리를 설치합니다.&lt;/li&gt;
&lt;li&gt;Python 3.12 소스 코드를 다운로드하고 압축을 해제합니다.&lt;/li&gt;
&lt;li&gt;Python 3.12를 OpenSSL 지원과 함께 구성하고 컴파일합니다.&lt;/li&gt;
&lt;li&gt;Python 및 Pip의 버전을 확인하여 설치가 올바르게 되었는지 검증합니다.&lt;/li&gt;
&lt;li&gt;pip를 설치 하고 올바르게 설치 되었는지 검증합니다.&lt;/li&gt;
&lt;li&gt;Python과 Pip에 대한 심볼릭 링크를 생성하여 /usr/bin 디렉토리에서 사용할 수 있도록 설정합니다.&lt;/li&gt;
&lt;li&gt;시간대를 설정하여 시스템 시간대를 Asia/Seoul로 변경합니다.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이 Dockerfile을 사용하면 Python 3.12와 Pip을 포함한 개발 환경을 AWS Linux 기반의 Docker 컨테이너에서 설정할 수 있습니다.&lt;/p&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;Python 3.12의 SSL 모듈에 대한 더 자세한 내용은&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.python.org/ko/3.12/library/ssl.html&quot;&gt;공식 문서&lt;/a&gt;를 참고하세요. 이 문서에는 SSL 모듈의 다양한 기능과 설정 방법이 자세히 설명되어 있습니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Python</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/445</guid>
      <comments>https://lahuman2study.tistory.com/445#entry445comment</comments>
      <pubDate>Mon, 5 Aug 2024 18:15:56 +0900</pubDate>
    </item>
    <item>
      <title>spring jpa 사용시 페이징 처리</title>
      <link>https://lahuman2study.tistory.com/444</link>
      <description>&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;게시글 목록 기능에서 페이징 처리는 단순하지만 많이 사용되는 기능입니다.&lt;/p&gt;
&lt;h2 id=&quot;주요-항목&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;주요 항목&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;요청 값 : 조회 하려는&lt;span&gt;&amp;nbsp;&lt;/span&gt;페이지 위치, 페이지에서 필요로 하는&lt;span&gt;&amp;nbsp;&lt;/span&gt;게시글 수, 추가로&lt;span&gt;&amp;nbsp;&lt;/span&gt;검색 조건&lt;/li&gt;
&lt;li&gt;응답 값 :&lt;span&gt;&amp;nbsp;&lt;/span&gt;게시글 목록, 페이지 네비게이션을 위한 총&lt;span&gt;&amp;nbsp;&lt;/span&gt;게시글 수&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;구현-방법&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;구현 방법&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이를 일일이 구현 하기 보다 jpa에서 지원하는&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Pageable.html&quot;&gt;Pageable&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;와&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Page.html&quot;&gt;Page&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;라이브러리를 사용하면 간단한게 처리 됩니다.&lt;/p&gt;
&lt;h2 id=&quot;예제-코드&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;예제 코드&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;// Controller
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController

@RestController
class Controller(private val service: ContentsService) {
    @GetMapping(&quot;/list&quot;)
    fun getList(
        @PageableDefault(page = 0, size = 10) pageable: Pageable
    ): Page&amp;lt;TipContents&amp;gt; {
        return contentsService.getList(pageable)
    }
}

// Service
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.stereotype.Service

@Service
class ContentsService(private val repository: ContentsRepository) {
    fun getTipContents(pageable: Pageable): Page&amp;lt;Contents&amp;gt; {
        return repository.findAll(pageable)
    }
}

// Repository
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.query.Param

interface TipContentsRepository : JpaRepository&amp;lt;Contents, Long&amp;gt; {
    fun findAll(
        pageable: Pageable
    ): Page&amp;lt;Contents&amp;gt;
}

&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;query-사용-예제-추가&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://github.com/Query&quot;&gt;@Query&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;사용 예제 추가&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;필요시 사용자 정의 SQL을 사용할 경우 다음과 같이&lt;span&gt;&amp;nbsp;&lt;/span&gt;@Query를 활용하여도 동일하게 페이징 처리가 됩니다.&lt;/p&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;// Repository
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.query.Param

interface TipContentsRepository : JpaRepository&amp;lt;Contents, Long&amp;gt; {
    @Query(
        &quot;&quot;&quot;
        SELECT 
            C.ID,
            C.TIP_TITLE,
            C.IMG_FILE_PATH ,
            C.PET_DCD,
            C.OPN_DT ,
            C.REG_DTM ,
            C.MOD_DTM
            '' as TIP_TXT // entity의 필수 값은 무조건 있어야 오류가 발생하지 않습니다. 
        FROM CONTENTS C
           WHERE (C.PET_DCD != :notPetDcd OR C.PET_DCD = 'ALL') 
           AND  C.id IN (
	           SELECT t.CONTENTS_M_ID 
	           FROM CATEGORY t
	           WHERE t.CTGY_CCD IN (:ctgyCcds)
           ) 
           AND OPN_DT &amp;lt;= TO_CHAR(sysdate, 'YYYYMMDD')
        ORDER BY OPN_DT DESC
    &quot;&quot;&quot;,
    countQuery = &quot;&quot;&quot;
        SELECT 
            COUNT(C.ID)
        FROM CONTENTS TCM
           WHERE (C.PET_DCD != :notPetDcd OR C.PET_DCD = 'ALL') 
           AND  TCM.id IN (
	           SELECT tcd.CONTENTS_M_ID 
	           FROM CATEGORY t
	           WHERE t.CTGY_CCD IN (:ctgyCcds)
           ) 
           AND OPN_DT &amp;lt;= TO_CHAR(sysdate, 'YYYYMMDD')
    &quot;&quot;&quot;,
    nativeQuery = true
    )
    fun findByPetDcdAndCtgyCcds(
        @Param(&quot;notPetDcd&quot;) notPetDcd: String,
        @Param(&quot;ctgyCcds&quot;) ctgyCcds: List&amp;lt;String&amp;gt;,
        pageable: Pageable
    ): Page&amp;lt;TipContentsM&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://wonit.tistory.com/483&quot;&gt;[배워보자 Spring Data JPA] JPA 에서 Pageable 을 이용한 페이징과 정렬&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>설치&amp;amp;설정 관련/Spring Framework</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/444</guid>
      <comments>https://lahuman2study.tistory.com/444#entry444comment</comments>
      <pubDate>Thu, 1 Aug 2024 18:15:08 +0900</pubDate>
    </item>
    <item>
      <title>kotlin operator invoke 로 데이터 검증 하기!</title>
      <link>https://lahuman2study.tistory.com/443</link>
      <description>&lt;h2 id=&quot;상황-설명&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;상황 설명&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;Price의 경우 0원 생성할 수 없지만, 시작값을 위해서는 1개는 존재 해야 합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이를 어떻게 처리 할까 고민했었는데 아래와 같은 해법이 있네요.&lt;/p&gt;
&lt;h2 id=&quot;코드-구현&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;코드 구현&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;data class Price private constructor (private val value: Double) { // 생성자를 비공개로 처리
    override fun toString() = value.toString()
    operator fun plus(price: Price) = Price(this.value + price.value)
    operator fun times(num: Int) = Price(this.value * num)
    
    companion object {
        val identity = Price(0.0) // 0원 구현 private constructor 이기 때문에 외부에서는 생성 못함 
        // 생성시 호출되는 invoke 함수를 companion으로만 제공 
	    operator fun invoke(value: Double) = 
            if (value &amp;gt; 0)
                Price(value)
            else 
                throw IllegalArgumentException(&quot;Price must be positive or null&quot;)
	
    }
}

fun main() {
    println(Price.identity) // 0.0 출력
    println(Price(5.0) + Price(4.8)) // 9.8 출력
    println(Price(5.0) * 3) // 15.0 출력
    println(Price(-0.0)) // Exception in thread &quot;main&quot; java.lang IllegalArgumentException: Price must be positive or null

    println(Price(3.12) * 3.2) // The floating-point literal does not conform to the expected type Int

    println(Price(5.0) * Price(4.8)) // Type mismatch: inferred type is Price but Int was expected

    println(Price(5.0) - 3) // Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public inline operator fun BigDecimal.minus(other: BigDecimal):
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;operator&lt;span&gt;&amp;nbsp;&lt;/span&gt;plus,&lt;span&gt;&amp;nbsp;&lt;/span&gt;times&lt;span&gt;&amp;nbsp;&lt;/span&gt;를 구현해서 위와 같이 사용 할 수 있습니다.&lt;/p&gt;
&lt;h2 id=&quot;operator-종류&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;operator 종류&lt;/h2&gt;
&lt;h3 id=&quot;산술-연산자&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size23&quot;&gt;산술 연산자&lt;/h3&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;| 함수 이름 | 연산자 | 설명 | |&amp;mdash;&amp;mdash;&amp;mdash;&amp;ndash;|&amp;mdash;&amp;mdash;&amp;ndash;|&amp;mdash;&amp;mdash;&amp;mdash;-| | plus | + | 더하기 | | minus | - | 빼기 | | times | * | 곱하기 | | div | / | 나누기 | | rem | % | 나머지 연산 |&lt;/p&gt;
&lt;h4 id=&quot;예제-코드&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size20&quot;&gt;예제 코드&lt;/h4&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;data class Price (private val value: Double) { 
    operator fun plus(price: Price) = Price(this.value + price.value)
    operator fun times(num: Int) = Price(this.value * num)
}
fun main() {
    println(Price(5.0) + Price(4.8))
    println(Price(5.0) * 3)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&quot;대입-연산자&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size23&quot;&gt;대입 연산자&lt;/h3&gt;
&lt;p&gt;함수 이름연산자설명&lt;/p&gt;
&lt;table style=&quot;background-color: #ffffff; color: #383838; text-align: justify; border-collapse: collapse; width: 100%;&quot; border=&quot;1&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;plusAssign&lt;/td&gt;
&lt;td&gt;+=&lt;/td&gt;
&lt;td&gt;더해서 대입&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;minusAssign&lt;/td&gt;
&lt;td&gt;-=&lt;/td&gt;
&lt;td&gt;빼서 대입&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;timesAssign&lt;/td&gt;
&lt;td&gt;*=&lt;/td&gt;
&lt;td&gt;곱해서 대입&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;divAssign&lt;/td&gt;
&lt;td&gt;/=&lt;/td&gt;
&lt;td&gt;나눠서 대입&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&quot;예제-코드-1&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size20&quot;&gt;예제 코드&lt;/h4&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;data class Price(private var value: Double) {
    operator fun plusAssign(price: Price) {
        this.value += price.value
    }
}

fun main() {
    val p1 = Price(5.0)
    val p2 = Price(4.8)

    p1 += p2

    println(p1) // Output: Price(value=9.8)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&quot;단항-연산자&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size23&quot;&gt;단항 연산자&lt;/h3&gt;
&lt;p&gt;함수 이름연산자설명 - object가 변수명&lt;/p&gt;
&lt;table style=&quot;background-color: #ffffff; color: #383838; text-align: justify; border-collapse: collapse; width: 100%;&quot; border=&quot;1&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;unaryPlus&lt;/td&gt;
&lt;td&gt;+&lt;/td&gt;
&lt;td&gt;+object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;unaryMinus&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;not&lt;/td&gt;
&lt;td&gt;!&lt;/td&gt;
&lt;td&gt;!object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;inc&lt;/td&gt;
&lt;td&gt;++&lt;/td&gt;
&lt;td&gt;++object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dec&lt;/td&gt;
&lt;td&gt;&amp;ndash;&lt;/td&gt;
&lt;td&gt;&amp;ndash;object&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&quot;예제-코드-2&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size20&quot;&gt;예제 코드&lt;/h4&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;data class Price(private var value: Double) {
    operator fun inc(): Price {
        value++
        return this
    }

    operator fun dec(): Price {
        value--
        return this
    }
}

fun main() {
    var p1 = Price(5.0)

    println(&quot;Original p1: $p1&quot;)

    p1++
    println(&quot;After incrementing: $p1&quot;)

    p1--
    println(&quot;After decrementing: $p1&quot;)
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://m.yes24.com/Goods/Detail/89564200&quot;&gt;코틀린을 다루는 기술&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>JAVA</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/443</guid>
      <comments>https://lahuman2study.tistory.com/443#entry443comment</comments>
      <pubDate>Tue, 30 Jul 2024 18:14:29 +0900</pubDate>
    </item>
    <item>
      <title>spring-boot with logback</title>
      <link>https://lahuman2study.tistory.com/442</link>
      <description>&lt;h1 id=&quot;spring-boot-에서-초기화-오류시-로그-표기-방법&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;spring-boot 에서 초기화 오류시 로그 표기 방법&lt;/h1&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;현상 : spring-boot 초기화 중 오류 발생시 log가 명확하게 표시 되지 않고 종료 오류 발생&lt;/li&gt;
&lt;li&gt;원인 : logback을 사용하고 있고, 설정 파일명을&lt;span&gt;&amp;nbsp;&lt;/span&gt;logback.xml로 사용중&lt;/li&gt;
&lt;li&gt;해결 방안 :&lt;span&gt;&amp;nbsp;&lt;/span&gt;logback.xml&lt;span&gt;&amp;nbsp;&lt;/span&gt;을&lt;span&gt;&amp;nbsp;&lt;/span&gt;logback-spring.xml&lt;span&gt;&amp;nbsp;&lt;/span&gt;으로 변경&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.spring.io/spring-boot/docs/2.1.13.RELEASE/reference/html/boot-features-logging.html#boot-features-logback-extensions&quot;&gt;26.7 Logback Extensions&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;를 확인하면,&lt;span&gt;&amp;nbsp;&lt;/span&gt;logback.xml을 사용하면 너무 빠르게 로딩 되어서 spring 오류가 출력 안되는 경우가 발생 할 수 있다고 합니다.&lt;/p&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.spring.io/spring-boot/docs/2.1.13.RELEASE/reference/html/howto-logging.html&quot;&gt;83. Logging&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>설치&amp;amp;설정 관련/Spring Framework</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/442</guid>
      <comments>https://lahuman2study.tistory.com/442#entry442comment</comments>
      <pubDate>Fri, 26 Jul 2024 17:32:39 +0900</pubDate>
    </item>
    <item>
      <title>java ArrayList의 동작</title>
      <link>https://lahuman2study.tistory.com/441</link>
      <description>&lt;h2 id=&quot;테스트용-코드-전체&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;테스트용 코드 전체&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;import java.lang.reflect.Field

fun main() {
//    val list = MutableList&amp;lt;String?&amp;gt;(1000) { null } // 초기 크기 설정
    val list = mutableListOf&amp;lt;Int&amp;gt;()
    println(&quot;list size : ${list.size} / list capacity:: ${getCapacity(list)}&quot;) // # 1 초기 생성
    for ( i in 0..25) {
        list.add(i+1)
        println(&quot;list size : ${list.size} / list capacity:: ${getCapacity(list)}&quot;) // # 2 출력
    }
}
// arraylist의 capacity 출력 
fun getCapacity(arrayList: List&amp;lt;*&amp;gt;?): Int {
    if (arrayList == null) {
        return 0
    }
    val field: Field = ArrayList::class.java.getDeclaredField(&quot;elementData&quot;)
    field.isAccessible = true

    return (field.get(arrayList) as Array&amp;lt;*&amp;gt;).size
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;결과-값&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;결과 값&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;arduino&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;list size : 0 / list capacity:: 0 // #1
list size : 1 / list capacity:: 10 // capacity 변화
list size : 2 / list capacity:: 10
list size : 3 / list capacity:: 10
list size : 4 / list capacity:: 10
list size : 5 / list capacity:: 10
list size : 6 / list capacity:: 10
list size : 7 / list capacity:: 10
list size : 8 / list capacity:: 10
list size : 9 / list capacity:: 10
list size : 10 / list capacity:: 10
list size : 11 / list capacity:: 15 // capacity 변화
list size : 12 / list capacity:: 15
list size : 13 / list capacity:: 15
list size : 14 / list capacity:: 15
list size : 15 / list capacity:: 15
list size : 16 / list capacity:: 22 // capacity 변화
list size : 17 / list capacity:: 22
list size : 18 / list capacity:: 22
list size : 19 / list capacity:: 22
list size : 20 / list capacity:: 22
list size : 21 / list capacity:: 22
list size : 22 / list capacity:: 22
list size : 23 / list capacity:: 33 // capacity 변화
list size : 24 / list capacity:: 33
list size : 25 / list capacity:: 33
list size : 26 / list capacity:: 33
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;설명&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;설명&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html&quot;&gt;ArrayList&lt;/a&gt;는 List 인터페이스를 구현한 동적 배열입니다. 내부적으로는 배열을 사용하여 요소를 저장하며, 필요에 따라 크기를 조절할 수 있습니다.&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;최초에 리스트를 생성하면, 크기와 용량 모두 0입니다.&lt;/li&gt;
&lt;li&gt;요소를 추가할 때마다 용량이 증가합니다. 용량이 모두 차면 새로운 배열을 생성하고 기존 데이터를 복사합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;동작-예시&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size23&quot;&gt;동작 예시&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;최초 list를 생성하고, size와 capacity를 확인하면 0 / 0&lt;/li&gt;
&lt;li&gt;list에 처음 데이터를 add 할 경우, size / capacity 는 1 / 10&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1422&quot; data-origin-height=&quot;256&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/oa8qW/btsHVS0o9x3/oB9rbZ82DgOLgYvkS3pNi0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/oa8qW/btsHVS0o9x3/oB9rbZ82DgOLgYvkS3pNi0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/oa8qW/btsHVS0o9x3/oB9rbZ82DgOLgYvkS3pNi0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Foa8qW%2FbtsHVS0o9x3%2FoB9rbZ82DgOLgYvkS3pNi0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1422&quot; height=&quot;256&quot; data-origin-width=&quot;1422&quot; data-origin-height=&quot;256&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;list에 2번째 데이터를 add&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;710&quot; data-origin-height=&quot;124&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/pE1Fv/btsHWTEiFg7/xCoEES7mgUAyyAYVAcDISk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/pE1Fv/btsHWTEiFg7/xCoEES7mgUAyyAYVAcDISk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/pE1Fv/btsHWTEiFg7/xCoEES7mgUAyyAYVAcDISk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FpE1Fv%2FbtsHWTEiFg7%2FxCoEES7mgUAyyAYVAcDISk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;710&quot; height=&quot;124&quot; data-origin-width=&quot;710&quot; data-origin-height=&quot;124&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;list에 10번째 데이터를 add&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1420&quot; data-origin-height=&quot;256&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/3hUkA/btsHWaT9byb/l0nJ3GnA7EmN2tjbWyAH10/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/3hUkA/btsHWaT9byb/l0nJ3GnA7EmN2tjbWyAH10/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/3hUkA/btsHWaT9byb/l0nJ3GnA7EmN2tjbWyAH10/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F3hUkA%2FbtsHWaT9byb%2Fl0nJ3GnA7EmN2tjbWyAH10%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1420&quot; height=&quot;256&quot; data-origin-width=&quot;1420&quot; data-origin-height=&quot;256&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;list에 11번째 데이터를 add 하면 새로운 배열을 생성하고, 기존 데이터를 아래와 같이 복사&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;2006&quot; data-origin-height=&quot;244&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/blVFLO/btsHU6LPKeb/KwDb1rFfeIUN1SxrskFxQK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/blVFLO/btsHU6LPKeb/KwDb1rFfeIUN1SxrskFxQK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/blVFLO/btsHU6LPKeb/KwDb1rFfeIUN1SxrskFxQK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FblVFLO%2FbtsHU6LPKeb%2FKwDb1rFfeIUN1SxrskFxQK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2006&quot; height=&quot;244&quot; data-origin-width=&quot;2006&quot; data-origin-height=&quot;244&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://www.baeldung.com/java-list-capacity-array-size&quot;&gt;The Capacity of an ArrayList vs the Size of an Array in Java&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://duooo-story.tistory.com/69&quot;&gt;Ehcache에서 만난 warning &amp;lsquo;The JVM is preventing Ehcache from accessing the subgraph beneath ~ cache sizes may be underestimated as a result&amp;rsquo;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html&quot;&gt;ArrayList&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://junghyungil.tistory.com/96&quot;&gt;[Java] ArrayList는 어떻게 동적으로 사이즈가 늘어나는가? add() flow(동작 방식)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA/in 기초</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/441</guid>
      <comments>https://lahuman2study.tistory.com/441#entry441comment</comments>
      <pubDate>Mon, 22 Jul 2024 17:31:55 +0900</pubDate>
    </item>
    <item>
      <title>Gmail SMTP 설정 가이드</title>
      <link>https://lahuman2study.tistory.com/439</link>
      <description>&lt;h1 id=&quot;2024년-기준-gmail-smtp-설정-가이드&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;2024년 기준, Gmail SMTP 설정 가이드&lt;/h1&gt;
&lt;blockquote style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-style=&quot;style1&quot;&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;2010년에 Gmail SMTP 설정을 간단하게 했던 기억이 있으신가요? 2022년 기준으로 설정 방식이 변경되었고, 다소 복잡해졌습니다. 이 글을 통해 2024년 기준 Gmail SMTP 설정 방법을 단계별로 알려드리겠습니다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;gmail-설정-진행&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;GMAIL 설정 진행&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;GMAIL &amp;gt; 톱니바퀴 &amp;gt; 모든 설정 보기&lt;img src=&quot;https://blog.kakaocdn.net/dn/Jg7NQ/btsHU6yiSmp/4A1bytgxM7dWWnCmwRoQNK/img.png&quot; /&gt;&lt;/li&gt;
&lt;li&gt;설정 &amp;gt; 전달 및 POP/IMAP&lt;img src=&quot;https://blog.kakaocdn.net/dn/12KFf/btsHVHY7BeV/HlNSeF3LCgmOtYgjHl3uRk/img.png&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;app-password-추가&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;APP PASSWORD 추가&lt;/h2&gt;
&lt;blockquote style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-style=&quot;style1&quot;&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이 메뉴가 검색시&lt;span&gt;&amp;nbsp;&lt;/span&gt;계정 &amp;gt; 보안 &amp;gt; 2단계 인증에 있다고 되어 있지만, 실제로 보이지 않고 주소 입력을 통해 접근해야 합니다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://myaccount.google.com/security&quot;&gt;&lt;span&gt;https&lt;/span&gt;&lt;span&gt;://&lt;/span&gt;&lt;span&gt;myaccount&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;google&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;com&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt;security&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;에서&lt;span&gt;&amp;nbsp;&lt;/span&gt;2-step verification&lt;span&gt;&amp;nbsp;&lt;/span&gt;밑에 app password 메뉴가 존재 하지 않습니다.&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://myaccount.google.com/apppasswords&quot;&gt;&lt;span&gt;https&lt;/span&gt;&lt;span&gt;://&lt;/span&gt;&lt;span&gt;myaccount&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;google&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;com&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt;apppasswords&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;로 직접 접근해서 추가 하면 됩니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;660&quot; data-origin-height=&quot;629&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bCBDrS/btsHWR7zrSs/cooJ2jSDFSKwhrbXtmGTR1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bCBDrS/btsHWR7zrSs/cooJ2jSDFSKwhrbXtmGTR1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bCBDrS/btsHWR7zrSs/cooJ2jSDFSKwhrbXtmGTR1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbCBDrS%2FbtsHWR7zrSs%2FcooJ2jSDFSKwhrbXtmGTR1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;660&quot; height=&quot;629&quot; data-origin-width=&quot;660&quot; data-origin-height=&quot;629&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이렇게 수정하고 나면 GMAIL SMTP를 사용할 수 있습니다.&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;다음은 사용 예제 입니다.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;947&quot; data-origin-height=&quot;752&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/Ebhsq/btsHXFrJDIE/XpUHK7LslQFSPEmAZAfX41/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/Ebhsq/btsHXFrJDIE/XpUHK7LslQFSPEmAZAfX41/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/Ebhsq/btsHXFrJDIE/XpUHK7LslQFSPEmAZAfX41/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FEbhsq%2FbtsHXFrJDIE%2FXpUHK7LslQFSPEmAZAfX41%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;947&quot; height=&quot;752&quot; data-origin-width=&quot;947&quot; data-origin-height=&quot;752&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;위 화면에서&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;username : xxx@gmail.com&lt;/li&gt;
&lt;li&gt;password : app password&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이렇게 설정 하면 됩니다.&lt;/p&gt;
&lt;h2 id=&quot;참고자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://support.google.com/mail/thread/4477145/no-app-passwords-under-security-signing-in-to-google-panel?hl=en&quot;&gt;No &amp;ldquo;App passwords&amp;rdquo; under &amp;ldquo;Security&amp;rdquo; -&amp;gt; &amp;ldquo;Signing in to Google&amp;rdquo; panel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://kincoding.com/entry/Google-Gmail-SMTP-%EC%82%AC%EC%9A%A9%EC%9D%84-%EC%9C%84%ED%95%9C-%EC%84%B8%ED%8C%85&quot;&gt;Google - Gmail SMTP 사용을 위한 세팅&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>설치&amp;amp;설정 관련</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/439</guid>
      <comments>https://lahuman2study.tistory.com/439#entry439comment</comments>
      <pubDate>Wed, 17 Jul 2024 17:30:03 +0900</pubDate>
    </item>
    <item>
      <title>최신 JDK 21과 Kotlin 1.9.22 조합에서 발견된 오류 및 주의 사항</title>
      <link>https://lahuman2study.tistory.com/440</link>
      <description>&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;최신 JDK 21과 Kotlin 1.9.22 조합을 사용하면서 몇 가지 오류와 주의 사항을 발견했습니다.&lt;/p&gt;
&lt;ol style=&quot;list-style-type: decimal; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;불변 컬렉션에서 addFirst와 addLast 사용 가능&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;놀랍게도, 불변 컬렉션인 List에 addFirst와 addLast 메서드를 사용할 수 있습니다. 예를 들어, 다음 코드는 오류 없이 실행됩니다.&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;&lt;code&gt;fun foo(x: List&amp;lt;String&amp;gt;) {
    x.add(&quot;&quot;) // 예상대로 오류
    x.addFirst(&quot;&quot;) // 허용됨
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이는 기존 Kotlin 버전과 다른 동작이며, 명확한 문서화가 이루어지지 않아 혼란을 야기할 수 있습니다.&lt;/p&gt;
&lt;ol style=&quot;list-style-type: decimal; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;null 허용 처리&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;null 값을 처리할 때 주의가 필요합니다.&lt;span&gt;&amp;nbsp;&lt;/span&gt;null 허용되지 않은 상황에서 addFirst와 addLast 메서드는 null 값을 허용합니다.&lt;/p&gt;
&lt;pre class=&quot;reasonml&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;&lt;code&gt;val mySet = kotlin.collections.LinkedHashSet&amp;lt;String&amp;gt;()
mySet.addFirst(null) // 허용됨
mySet.addLast(null) // 허용됨
//mySet.add(null) // null can not be a value of a non-null type String

val myMap = kotlin.collections.LinkedHashMap&amp;lt;Int, String&amp;gt;()
myMap.putFirst(0, null)
myMap.putLast(1, null)
//myMap[2] = null // null can not be a value of a non-null type TypeVariable(V)
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;이는 jdk 21에서 신규 메소드를 kotlin 처리 과정에서 생긴 문제로 보이며, Kotlin 2.0.0 이상에서 해결될 것으로 예상됩니다.&lt;/p&gt;
&lt;ol style=&quot;list-style-type: decimal; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;Kotlin 2.0.0 이상에서 확인 필요&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;현재 발견된 오류들은 Kotlin 1.9.22, 1.9.23 등 버전에서만 발생하는 것으로 확인되었습니다. Kotlin 2.0.0-RC 이상 버전에서는 해결될 가능성이 높으므로, 업그레이드 후 다시 확인하는 것이 좋습니다.&lt;/p&gt;
&lt;ol style=&quot;list-style-type: decimal; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;결론&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;JDK 21과 Kotlin 조합을 사용할 때는 위의 오류와 주의 사항을 인지하고, Kotlin 2.0.0 이상 버전으로 업그레이드를 고려하는 것이 좋습니다. 또한, Kotlin 공식 문서 및 버그 추적 시스템을 통해 최신 정보를 확인하는 것이 중요합니다.&lt;/p&gt;
&lt;h2 id=&quot;참고자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://youtrack.jetbrains.com/issue/KT-64640/Prevent-mutating-SequenceCollection-methods-from-JDK-21-be-available-on-read-only-collections?fbclid=IwZXh0bgNhZW0CMTAAAR1HBDcgUpHV9G4lonTIZCGrDSfCwmfllprNpMWZ7s-SoYxotLYib96Hk0c_aem_AdCwyzm0RzsjJxSLYzcvX9oitCBb6xuKwla2Zo9gH0xF5naFbweR7W12yGpnvpWAeKBMVFUP68hy9GvCDw1edbyB&quot;&gt;Prevent mutating SequenceCollection methods from JDK 21 be available on read-only collections&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://youtrack.jetbrains.com/issue/KT-61223/JDK-21-new-addFirst-addLast-and-putFirst-putLast-methods-allow-adding-nullable-value-for-non-null-types?fbclid=IwZXh0bgNhZW0CMTAAAR2d3AXtvhkRdxnzWmXedaYhmSrr7a3q9cTdtyEcNXrzVZ2sEjHXwt9IAKo_aem_AdD5avxC0u2j8gK3szuwFSoQFHqnuNt4wlEQu2NCgfjCIuAsFazQDJ2ANqQsNdIrNVYzA8hCXihu4xxcSJnc976x&quot;&gt;JDK 21: new addFirst/addLast and putFirst/putLast methods allow adding nullable value for non-null types&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/440</guid>
      <comments>https://lahuman2study.tistory.com/440#entry440comment</comments>
      <pubDate>Fri, 12 Jul 2024 17:30:48 +0900</pubDate>
    </item>
    <item>
      <title>ubuntu의 nginx의 ssl 인증서 설치</title>
      <link>https://lahuman2study.tistory.com/438</link>
      <description>&lt;h1 id=&quot;lets-encrypt를-사용하여-https-자동-구성&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;Let&amp;rsquo;s Encrypt를 사용하여 HTTPS 자동 구성&lt;/h1&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;Certbot, Let&amp;rsquo;s Encrypt 및 ACME(자동 인증서 관리 환경) 프로토콜의 목적은 HTTPS 서버를 설정하고 사람의 개입 없이 브라우저에서 신뢰할 수 있는 인증서를 자동으로 얻을 수 있도록 하는 것입니다. 이는 웹 서버에서 인증서 관리 에이전트를 실행하여 수행됩니다.&lt;/p&gt;
&lt;h2 id=&quot;설치--설정--실행-명령어&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;설치 &amp;amp; 설정 &amp;amp; 실행 명령어&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;sql&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;# 설치
$ sudo snap install --classic certbot
certbot 2.10.0 from Certbot Project (certbot-eff✓) installed

$ sudo ln -s /snap/bin/certbot /usr/bin/certbot

# 설정
$ sudo certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): lahuman@daum.net

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf. You must agree in
order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Account registered.

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: lahuman.zapto.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for lahuman.zapto.org

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/lahuman.zapto.org/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/lahuman.zapto.org/privkey.pem
This certificate expires on 2024-07-07.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for lahuman.zapto.org to /etc/nginx/sites-enabled/default
Congratulations! You have successfully enabled HTTPS on https://lahuman.zapto.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# nginx 설정 확인 및 재실행
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

$ sudo nginx -r reload

&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;마치며&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;마치며&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;생각보다 설정이 쉬워서 이렇게만 하면 된다고 하고 놀랐네요. :)&lt;/p&gt;
&lt;h2 id=&quot;참고-자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고 자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://snapcraft.io/install/certbot/ubuntu&quot;&gt;Install certbot on Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>LINUX</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/438</guid>
      <comments>https://lahuman2study.tistory.com/438#entry438comment</comments>
      <pubDate>Tue, 9 Jul 2024 17:29:20 +0900</pubDate>
    </item>
    <item>
      <title>spring boot jar 파일 실행시 application.yml 주입 하기</title>
      <link>https://lahuman2study.tistory.com/437</link>
      <description>&lt;h1 id=&quot;spring-boot-실행시-설정-파일-외부-주입-방법&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;spring boot 실행시 설정 파일 외부 주입 방법&lt;/h1&gt;
&lt;h2 id=&quot;실행-명령어를-이용한-주입&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;실행 명령어를 이용한 주입&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;awk&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;$ java -jar app.jar --spring.config.location=file:///Users/home/config/jdbc.properties
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;디렉토리-기반-주입&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;디렉토리 기반 주입&lt;/h2&gt;
&lt;div style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot;&gt;
&lt;div style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;
&lt;pre class=&quot;mel&quot; style=&quot;background-color: #49483e; color: #f8f8f2;&quot;&gt;&lt;code&gt;$ java -jar app.jar --spring.config.name=application,jdbc --spring.config.location=file:///Users/home/config
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;마치며&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;마치며&lt;/h2&gt;
&lt;p style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size16&quot;&gt;다른 여러가지 방법이 있지만 위의 2가지 방법으로 대부분 처리가 가능합니다.&lt;/p&gt;
&lt;h2 id=&quot;참고자료&quot; style=&quot;background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-size=&quot;size26&quot;&gt;참고자료&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc; background-color: #ffffff; color: #383838; text-align: justify;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #282828;&quot; href=&quot;https://www.baeldung.com/spring-properties-file-outside-jar&quot;&gt;Spring Properties File Outside jar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA</category>
      <author>lahuman</author>
      <guid isPermaLink="true">https://lahuman2study.tistory.com/437</guid>
      <comments>https://lahuman2study.tistory.com/437#entry437comment</comments>
      <pubDate>Fri, 5 Jul 2024 17:27:57 +0900</pubDate>
    </item>
  </channel>
</rss>