<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://daejoon.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://daejoon.github.io/" rel="alternate" type="text/html" /><updated>2024-09-28T01:02:12+09:00</updated><id>https://daejoon.github.io/feed.xml</id><title type="html">뚱2 블로그</title><subtitle></subtitle><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><entry><title type="html">Mac에서 Docker를 Podman으로 대체해보기 추가적으로 IntelliJ IDEA 호환성 유지</title><link href="https://daejoon.github.io/2024/09/25/docker%EC%9D%84-podman-%EC%9C%BC%EB%A1%9C-%EB%8C%80%EC%B2%B4%ED%95%B4%EB%B3%B4%EA%B8%B0/" rel="alternate" type="text/html" title="Mac에서 Docker를 Podman으로 대체해보기 추가적으로 IntelliJ IDEA 호환성 유지" /><published>2024-09-25T00:00:00+09:00</published><updated>2024-09-25T00:00:00+09:00</updated><id>https://daejoon.github.io/2024/09/25/docker%EC%9D%84-podman-%EC%9C%BC%EB%A1%9C-%EB%8C%80%EC%B2%B4%ED%95%B4%EB%B3%B4%EA%B8%B0</id><content type="html" xml:base="https://daejoon.github.io/2024/09/25/docker%EC%9D%84-podman-%EC%9C%BC%EB%A1%9C-%EB%8C%80%EC%B2%B4%ED%95%B4%EB%B3%B4%EA%B8%B0/"><![CDATA[<blockquote>
  <p>개인이 사용시에는 Docker-Desktop(이하 Docker)이나 Podman-Desktop(이하 Podman) 둘중 편한것으로 선택하면 됩니다.
Docker는 회사에서 사용하면 회사 규모에 따라서 <a href="https://www.docker.com/pricing/">라이센스</a>가 필요합니다.
개인이 사용하는데 무료이지만 점점 사이트 로그인도 필요하고 강제하는 부분이 늘어나서 이번기회에 Podman으로 변경하였습니다.</p>

  <p>변경하면서 제일 걱정이 되는 부분은 IntelliJ-IDEA와의 호환성이 이었습니다.
개인적으로 대부분 작업을 IntelliJ-IDEA 한곳에서 작업을 진행합니다.
Docker를 구동시키면 View &gt; Tool Windows &gt; Service에서 확인 하는데 이분도 같이 해결되면 좋겠다는 생각을 했습니다.</p>
</blockquote>

<p>아래는 Podman으로 대체 방법입니다.</p>

<h2 id="brew-설치">Brew 설치</h2>

<ul>
  <li>기존에 설치되어 있다면 건너뛰면 됩니다.</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/bin/bash <span class="nt">-c</span> <span class="s2">"</span><span class="si">$(</span>curl <span class="nt">-fsSL</span> https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh<span class="si">)</span><span class="s2">"</span>
</code></pre></div></div>

<h2 id="podman-설치">Podman 설치</h2>

<ul>
  <li>podman-compose도 같이 설치 해 줍니다.</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>brew <span class="nb">install </span>podman-desktop podman-compose
</code></pre></div></div>

<h2 id="podman-설정">Podman 설정</h2>

<ul>
  <li>Docker Compatibility Enable
    <ul>
      <li>Docker와 호환성을 위해서 활성화 합니다.</li>
    </ul>
  </li>
</ul>

<p><img src="/assets/images/2024-09-25/docker-compatibility-enable.png" alt="" /></p>

<ul>
  <li>Registries 에서 기존 Docker Hub 계정 등록 합니다.
    <ul>
      <li>docker pulling시 이용 됩니다.</li>
    </ul>
  </li>
</ul>

<p><img src="/assets/images/2024-09-25/docker-registries.png" alt="" /></p>

<h2 id="docker-호환성-유지를-위한-심볼릭-추가">Docker 호환성 유지를 위한 심볼릭 추가</h2>

<ul>
  <li>기존 Docker 명령어 그대로 사용하기 위해서 심볼릭 링크를 추가 합니다.</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo ln</span> <span class="nt">-s</span> <span class="si">$(</span>which podman<span class="si">)</span> /usr/local/bin/docker
<span class="nb">sudo ln</span> <span class="nt">-s</span> <span class="si">$(</span>which podman-compose<span class="si">)</span> /usr/local/bin/docker-compose
</code></pre></div></div>

<ul>
  <li>환경 변수 추가</li>
</ul>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export DOCKER_HOST=unix:///Users/$USER/.local/share/containers/podman/machine/podman.sock
</code></pre></div></div>

<h2 id="intellij-idea--docker-설정">IntelliJ IDEA &gt; Docker 설정</h2>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">echo</span> <span class="s2">"unix:///Users/</span><span class="nv">$USER</span><span class="s2">/.local/share/containers/podman/machine/podman.sock"</span>
</code></pre></div></div>

<ul>
  <li>쉘 스크립트 결과를 Engin API URL에 입력합니다.</li>
</ul>

<p><img src="/assets/images/2024-09-25/intellij-podman-engin-api-url.png" alt="" /></p>

<ul>
  <li>서비스 연결 확인</li>
</ul>

<p><img src="/assets/images/2024-09-25/intellij-idea-services.png" alt="" /></p>

<h2 id="참고">참고</h2>

<ul>
  <li><a href="https://brew.sh/">Homebrew Homepage</a></li>
  <li><a href="https://www.jetbrains.com/help/rider/Podman.html">Jetbrains Rider Podman</a></li>
  <li><a href="https://podman-desktop.io/docs/migrating-from-docker/using-podman-mac-helper">Using the podman-mac-helper tool to migrate from Docker to Podman on macOS</a></li>
  <li><a href="https://podman-desktop.io/docs/troubleshooting/troubleshooting-podman-on-macos">Troubleshooting Podman on macOS</a></li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="intellij" /><category term="docker" /><category term="mac" /><category term="m1" /><category term="docker" /><category term="podman" /><summary type="html"><![CDATA[개인이 사용시에는 Docker-Desktop(이하 Docker)이나 Podman-Desktop(이하 Podman) 둘중 편한것으로 선택하면 됩니다. Docker는 회사에서 사용하면 회사 규모에 따라서 라이센스가 필요합니다. 개인이 사용하는데 무료이지만 점점 사이트 로그인도 필요하고 강제하는 부분이 늘어나서 이번기회에 Podman으로 변경하였습니다. 변경하면서 제일 걱정이 되는 부분은 IntelliJ-IDEA와의 호환성이 이었습니다. 개인적으로 대부분 작업을 IntelliJ-IDEA 한곳에서 작업을 진행합니다. Docker를 구동시키면 View &gt; Tool Windows &gt; Service에서 확인 하는데 이분도 같이 해결되면 좋겠다는 생각을 했습니다.]]></summary></entry><entry><title type="html">Git 확장 함수를 만들어 보자</title><link href="https://daejoon.github.io/2024/03/15/git-update/" rel="alternate" type="text/html" title="Git 확장 함수를 만들어 보자" /><published>2024-03-15T00:00:00+09:00</published><updated>2024-03-15T00:00:00+09:00</updated><id>https://daejoon.github.io/2024/03/15/git-update</id><content type="html" xml:base="https://daejoon.github.io/2024/03/15/git-update/"><![CDATA[<h1 id="git-확장함수">Git 확장함수</h1>

<p>git을 사용하다 보면은 명령어가 길어져서 거추장 스러울때가 있다. 
난 개인적으로 특히 브랜치를 업데이트 할때 그 브랜치로 checkout을 한후 업데이트를 해야 하는데
업데이트 하려는 브랜치가 많다 보면은 이게 정말 일이다. 
그렇다고 GUI 툴을 사용하는것도 아니어서 브랜치 관련해서 업데이트 할려면 정말 귀찮아서 어떻게 하면
줄일수 있을까 고민하다가 Shell function 만드는 것으로 해결 봤다.</p>

<h2 id="사용-방법">사용 방법</h2>

<ul>
  <li>
    <p><code class="language-plaintext highlighter-rouge">.zshrc</code> 에 코드를 넣는다.
<script src="https://gist.github.com/daejoon/a05347f454ee63a13049c7b36c1b735a.js"></script></p>
  </li>
  <li>현재 브랜치를 최신화 한다. 브랜치 명을 선언하지 않으면 현재 브랜치 업데이트
    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git-update
</code></pre></div>    </div>
  </li>
  <li>현재 브랜치를 checkout 하지 않고 다른 브랜치를 업데이트 하는 방법
    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git-update develop
</code></pre></div>    </div>
  </li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="shell" /><category term="git" /><category term="shell" /><summary type="html"><![CDATA[Git 확장함수]]></summary></entry><entry><title type="html">EditorConfig 사용해보기</title><link href="https://daejoon.github.io/2023/09/08/editorconfig/" rel="alternate" type="text/html" title="EditorConfig 사용해보기" /><published>2023-09-08T00:00:00+09:00</published><updated>2023-09-08T00:00:00+09:00</updated><id>https://daejoon.github.io/2023/09/08/editorconfig</id><content type="html" xml:base="https://daejoon.github.io/2023/09/08/editorconfig/"><![CDATA[<h1 id="editorconfig">EditorConfig</h1>

<blockquote>
  <p>EditorConfig는 여러 개발자가 다양한 편집기와 IDE에서 동일한 프로젝트를 작업할 때 일관된 
코딩 스타일을 유지할 수 있도록 도와준다</p>
</blockquote>

<ul>
  <li>추가적으로 IntelliJ는 <code class="language-plaintext highlighter-rouge">.editorconfig</code>의 확장 속성을 지원하기 때문에 팀원 모두가 IntelliJ를 사용한다면 코드의 통일성을 맞추기 쉽다.</li>
</ul>

<h2 id="코드">코드</h2>

<script src="https://gist.github.com/daejoon/78fde4edef3b77dafcec520db3805f82.js"></script>

<table>
  <thead>
    <tr>
      <th>속성명</th>
      <th>뜻</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>charset</td>
      <td>파일 인코딩 타입</td>
    </tr>
    <tr>
      <td>insert_final_newline</td>
      <td>파일이 줄바꿈으로 끝나야 하는지 여부</td>
    </tr>
    <tr>
      <td>end_of_line</td>
      <td>줄의 끝 파일 형식</td>
    </tr>
    <tr>
      <td>max_line_length</td>
      <td>지정된 문자 수 뒤에 라인 줄 바꿈을 강제 적용</td>
    </tr>
    <tr>
      <td>ij_visual_guides</td>
      <td>intellij 전용 옵션, 코딩시 가이드 라인 문자 수</td>
    </tr>
    <tr>
      <td>indent_style</td>
      <td>들여쓰기 스타일</td>
    </tr>
    <tr>
      <td>indent_size</td>
      <td>들여쓰기 크기</td>
    </tr>
    <tr>
      <td>continuation_indent_size</td>
      <td>연속들여쓰기 코드블록과 연속줄 구분에 좋다</td>
    </tr>
    <tr>
      <td>trim_trailing_whitespace</td>
      <td>줄 끝에 공백을 제거할지 여부</td>
    </tr>
  </tbody>
</table>

<h2 id="참고">참고</h2>

<ul>
  <li><a href="https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties">properties</a></li>
  <li><a href="https://www.jetbrains.com/help/idea/editorconfig.html">intellij idea editorconfig</a></li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="java" /><category term="editorconfig" /><category term="java" /><category term="intellij" /><summary type="html"><![CDATA[EditorConfig]]></summary></entry><entry><title type="html">AutoParams에서 Entity를 Test Fixture로 사용할때 컬럼제한 해결 하기</title><link href="https://daejoon.github.io/2023/08/22/autoparams-entity%EC%9A%A9-test-fixture-%EC%A0%81%EC%9A%A9/" rel="alternate" type="text/html" title="AutoParams에서 Entity를 Test Fixture로 사용할때 컬럼제한 해결 하기" /><published>2023-08-22T00:00:00+09:00</published><updated>2023-08-22T00:00:00+09:00</updated><id>https://daejoon.github.io/2023/08/22/autoparams-entity%EC%9A%A9-test-fixture-%EC%A0%81%EC%9A%A9</id><content type="html" xml:base="https://daejoon.github.io/2023/08/22/autoparams-entity%EC%9A%A9-test-fixture-%EC%A0%81%EC%9A%A9/"><![CDATA[<h2 id="배경">배경</h2>

<p><a href="https://github.com/AutoParams/AutoParams"><code class="language-plaintext highlighter-rouge">AutoParams</code></a>을 참 요긴하게 사용하고 있다. 웬만한 파라미터는 기본적으로 지원하는데
<code class="language-plaintext highlighter-rouge">@Entity</code>의 경우는 데이터베이스 컬럼에 영향을 받아서 AutoParams으로 만들어진 데이터를 가지고 테스트 하다보면 디비 컬럼 Length 조건에 
걸려서 오류가 나는 경우가 발생한다. 이런 경우는 <a href="https://github.com/AutoParams/AutoParams#customization-annotation"><code class="language-plaintext highlighter-rouge">Customizer</code></a> 확장 포인트를 열어뒀다. 그걸 이용해서 <code class="language-plaintext highlighter-rouge">@Column</code>의 Length를 읽어서 
값을 제한하게 하였다. 아래는 구현코드 이다.</p>

<h2 id="코드">코드</h2>

<script src="https://gist.github.com/daejoon/e32c83ac6427e234354b79bb8f000c74.js"></script>

<script src="https://gist.github.com/daejoon/a17e7acbfd121749a66e5a823c11be34.js"></script>

<h2 id="사용법">사용법</h2>

<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nd">@ParameterizedTest</span>
<span class="nd">@AutoSource</span>
<span class="nd">@Customization</span><span class="o">(</span><span class="nc">DomainCustomization</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
<span class="kt">void</span> <span class="nf">test</span><span class="o">(</span><span class="nc">MyEntity</span> <span class="n">entity</span><span class="o">)</span> <span class="o">{</span>
    <span class="o">...</span>
<span class="o">}</span>
</code></pre></div></div>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="java" /><category term="java" /><category term="autoparams" /><category term="test" /><category term="entity" /><category term="fixture" /><summary type="html"><![CDATA[배경]]></summary></entry><entry><title type="html">curl hosts 파일을 수정하지 않고 호출하기</title><link href="https://daejoon.github.io/2023/07/12/Curl-hosts-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%88%98%EC%A0%95%ED%95%98%EC%A7%80-%EC%95%8A%EA%B3%A0-%ED%98%B8%EC%B6%9C%ED%95%98%EA%B8%B0/" rel="alternate" type="text/html" title="curl hosts 파일을 수정하지 않고 호출하기" /><published>2023-07-12T00:00:00+09:00</published><updated>2023-07-12T00:00:00+09:00</updated><id>https://daejoon.github.io/2023/07/12/Curl-hosts-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%88%98%EC%A0%95%ED%95%98%EC%A7%80-%EC%95%8A%EA%B3%A0-%ED%98%B8%EC%B6%9C%ED%95%98%EA%B8%B0</id><content type="html" xml:base="https://daejoon.github.io/2023/07/12/Curl-hosts-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%88%98%EC%A0%95%ED%95%98%EC%A7%80-%EC%95%8A%EA%B3%A0-%ED%98%B8%EC%B6%9C%ED%95%98%EA%B8%B0/"><![CDATA[<p>로컬에서 테스트를 위해서는 다양한 호출 방법이 있을수 있다.</p>

<ul>
  <li>IP로 호출하기</li>
  <li>Domain으로 호출하기</li>
</ul>

<p>경우에 따라서는 등록되어 있지 않지만 IP로 호출하면 안되는 경우도 있다 보통 서비스에서 도메인 형식을 체크해서 튕기도록 구성되어 있다.</p>

<p>이럴때 사용하면 좋은 방법이다.</p>

<p>보통은 /etc/hosts 파일을 수정하는데 수정하기도 귀찮고 테스트 끝나면 원복을 안하면 차후에 실수하기도 한다.</p>

<h2 id="사용방법">사용방법</h2>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl <span class="nt">--resolve</span> <span class="s1">'{도메인}:{포트}:{아이피}'</span> <span class="o">{</span>url<span class="o">}</span>
</code></pre></div></div>

<h3 id="사용예">사용예</h3>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl <span class="nt">--resolve</span> <span class="s1">'blog.ddoong2.com:4000:127.0.0.1'</span> http://blog.ddoong2.com:4000
</code></pre></div></div>

<ul>
  <li>로컬에서 Jekyll을 이용해서 띄울때 예제</li>
  <li>우선 순위에 의해서 DNS 보다 먼저 설정 된다.</li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="linux" /><category term="shell" /><category term="linux" /><category term="mac" /><summary type="html"><![CDATA[로컬에서 테스트를 위해서는 다양한 호출 방법이 있을수 있다.]]></summary></entry><entry><title type="html">Java Oracle 에러 로케일을 인식 할 수 없습니다 (M1)</title><link href="https://daejoon.github.io/2023/05/24/m1-oracle-locale-error/" rel="alternate" type="text/html" title="Java Oracle 에러 로케일을 인식 할 수 없습니다 (M1)" /><published>2023-05-24T00:00:00+09:00</published><updated>2023-05-24T00:00:00+09:00</updated><id>https://daejoon.github.io/2023/05/24/m1-oracle-locale-error</id><content type="html" xml:base="https://daejoon.github.io/2023/05/24/m1-oracle-locale-error/"><![CDATA[<blockquote>
  <p>Mac에서 메이저버전 OS 업데이트가 있으면 주로 발생한다.
아무래도 대규모 업데이트가 발생하면서 설정값이 초기화 되는 듯 하다.</p>
</blockquote>

<h2 id="1차-해결방법">1차 해결방법</h2>

<ul>
  <li>M1이 아닐때는 <code class="language-plaintext highlighter-rouge">언어 및 지역</code>에서 지역을 대한민국 -&gt; 미국 -&gt; 대한민국 으로 변경</li>
</ul>

<h2 id="2차-해결방법">2차 해결방법</h2>

<ul>
  <li>VM Option 추가</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">-Duser</span>.language<span class="o">=</span>ko <span class="nt">-Duser</span>.country<span class="o">=</span>KR
</code></pre></div></div>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="java" /><category term="java" /><category term="mac" /><category term="m1" /><category term="arm64" /><summary type="html"><![CDATA[Mac에서 메이저버전 OS 업데이트가 있으면 주로 발생한다. 아무래도 대규모 업데이트가 발생하면서 설정값이 초기화 되는 듯 하다.]]></summary></entry><entry><title type="html">Docker arm64로 테스트 할때 Architecture간 오류 해결</title><link href="https://daejoon.github.io/2022/12/14/docker-arm64-test/" rel="alternate" type="text/html" title="Docker arm64로 테스트 할때 Architecture간 오류 해결" /><published>2022-12-14T00:00:00+09:00</published><updated>2022-12-14T00:00:00+09:00</updated><id>https://daejoon.github.io/2022/12/14/docker-arm64-test</id><content type="html" xml:base="https://daejoon.github.io/2022/12/14/docker-arm64-test/"><![CDATA[<blockquote>
  <p>대부분의 예제는 x86을 대상으로 이미지가 생성되어 있다. 특히 동영상 강좌나 예제를 실행할때 Architecture 간 오류가 발생하면
직접 arm64용으로 이미지를 만들어야 한다.</p>
</blockquote>

<h2 id="해결방법">해결방법</h2>

<ul>
  <li>M1에서 빌드 한다.</li>
  <li>이미지 빌드</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker build <span class="nb">.</span> <span class="o">{</span>account_id<span class="o">}</span>/<span class="o">{</span>image_name<span class="o">}</span>:<span class="o">{</span>tag_name<span class="o">}</span>
</code></pre></div></div>

<ul>
  <li>Docker Hub 로그인</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker login
</code></pre></div></div>

<ul>
  <li>이미지 Push</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker push <span class="o">{</span>account_id<span class="o">}</span>/<span class="o">{</span>image_name<span class="o">}</span>:<span class="o">{</span>tag_name<span class="o">}</span>
</code></pre></div></div>

<ul>
  <li>사용 예
    <ul>
      <li>tag 버전을 붙이지 않으면 Latest로 가져온다.</li>
    </ul>
  </li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker run <span class="nt">-d</span> <span class="o">{</span>account_id<span class="o">}</span>/<span class="o">{</span>image_name<span class="o">}</span>:<span class="o">{</span>tag_name<span class="o">}</span>
</code></pre></div></div>

<h2 id="참고">참고</h2>

<ul>
  <li><a href="https://docs.docker.com/build/install-buildx/">Install Docker Buildx</a>를 이용하면 Multi-Architecture
빌드가 가능하다</li>
  <li><a href="https://github.com/docker/buildx#windows-and-macos">github docker/buildx</a></li>
  <li>맥설치</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>brew <span class="nb">install </span>docker-buildx
</code></pre></div></div>

<ul>
  <li>실행권한 추가</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">chmod</span> +x ~/.docker/cli-plugins/docker-buildx
</code></pre></div></div>

<ul>
  <li>Multi build</li>
</ul>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ docker buildx build --platform linux/amd64,linux/arm64 . {account_id}/{image_name}:{tag_name}
</code></pre></div></div>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="mac" /><category term="mac" /><category term="m1" /><category term="arm64" /><summary type="html"><![CDATA[대부분의 예제는 x86을 대상으로 이미지가 생성되어 있다. 특히 동영상 강좌나 예제를 실행할때 Architecture 간 오류가 발생하면 직접 arm64용으로 이미지를 만들어야 한다.]]></summary></entry><entry><title type="html">Mac Ventura 에서 SSH 접속 안될때</title><link href="https://daejoon.github.io/2022/11/12/ssh-not-working-in-ventura/" rel="alternate" type="text/html" title="Mac Ventura 에서 SSH 접속 안될때" /><published>2022-11-12T00:00:00+09:00</published><updated>2022-11-12T00:00:00+09:00</updated><id>https://daejoon.github.io/2022/11/12/ssh-not-working-in-ventura</id><content type="html" xml:base="https://daejoon.github.io/2022/11/12/ssh-not-working-in-ventura/"><![CDATA[<blockquote>
  <p>Mac OS Ventura로 업데이트 하고 나서 잘 사용하던 SSH가 동작하지 않는다.</p>
</blockquote>

<h2 id="해결방법">해결방법</h2>

<ul>
  <li><code class="language-plaintext highlighter-rouge">/etc/ssh/ssh_config</code> 수정 마지막에 아래 내용 추가</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>vi /etc/ssh/ssh_config

...
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa
</code></pre></div></div>

<ul>
  <li>전체 설정</li>
</ul>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#       $OpenBSD: ssh_config,v 1.35 2020/07/17 03:43:42 dtucker Exp $</span>

<span class="c"># This is the ssh client system-wide configuration file.  See</span>
<span class="c"># ssh_config(5) for more information.  This file provides defaults for</span>
<span class="c"># users, and the values can be changed in per-user configuration files</span>
<span class="c"># or on the command line.</span>

<span class="c"># Configuration data is parsed as follows:</span>
<span class="c">#  1. command line options</span>
<span class="c">#  2. user-specific file</span>
<span class="c">#  3. system-wide file</span>
<span class="c"># Any configuration value is only changed the first time it is set.</span>
<span class="c"># Thus, host-specific definitions should be at the beginning of the</span>
<span class="c"># configuration file, and defaults at the end.</span>

<span class="c"># This Include directive is not part of the default ssh_config shipped with</span>
<span class="c"># OpenSSH. Options set in the included configuration files generally override</span>
<span class="c"># those that follow.  The defaults only apply to options that have not been</span>
<span class="c"># explicitly set.  Options that appear multiple times keep the first value set,</span>
<span class="c"># unless they are a multivalue option such as IdentityFile.</span>
Include /etc/ssh/ssh_config.d/<span class="k">*</span>

<span class="c"># Site-wide defaults for some commonly used options.  For a comprehensive</span>
<span class="c"># list of available options, their meanings and defaults, please see the</span>
<span class="c"># ssh_config(5) man page.</span>

<span class="c"># Host *</span>
<span class="c">#   ForwardAgent no</span>
<span class="c">#   ForwardX11 no</span>
<span class="c">#   PasswordAuthentication yes</span>
<span class="c">#   HostbasedAuthentication no</span>
<span class="c">#   GSSAPIAuthentication no</span>
<span class="c">#   GSSAPIDelegateCredentials no</span>
<span class="c">#   BatchMode no</span>
<span class="c">#   CheckHostIP yes</span>
<span class="c">#   AddressFamily any</span>
<span class="c">#   ConnectTimeout 0</span>
<span class="c">#   StrictHostKeyChecking ask</span>
<span class="c">#   IdentityFile ~/.ssh/id_rsa</span>
<span class="c">#   IdentityFile ~/.ssh/id_dsa</span>
<span class="c">#   IdentityFile ~/.ssh/id_ecdsa</span>
<span class="c">#   IdentityFile ~/.ssh/id_ed25519</span>
<span class="c">#   Port 22</span>
<span class="c">#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc</span>
<span class="c">#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com</span>
<span class="c">#   EscapeChar ~</span>
<span class="c">#   Tunnel no</span>
<span class="c">#   TunnelDevice any:any</span>
<span class="c">#   PermitLocalCommand no</span>
<span class="c">#   VisualHostKey no</span>
<span class="c">#   ProxyCommand ssh -q -W %h:%p gateway.example.com</span>
<span class="c">#   RekeyLimit 1G 1h</span>
<span class="c">#   UserKnownHostsFile ~/.ssh/known_hosts.d/%k</span>
Host <span class="k">*</span>
    SendEnv LANG LC_<span class="k">*</span>
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa
</code></pre></div></div>

<h2 id="참고">참고</h2>

<ul>
  <li><a href="https://www.droidwin.com/ssh-not-working-in-macos-ventura-fix/">SSH not working in macOS Ventura: How to Fix</a></li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="mac" /><category term="mac" /><summary type="html"><![CDATA[Mac OS Ventura로 업데이트 하고 나서 잘 사용하던 SSH가 동작하지 않는다.]]></summary></entry><entry><title type="html">Parameter VS Argument</title><link href="https://daejoon.github.io/2022/10/29/parameter-vs-argument/" rel="alternate" type="text/html" title="Parameter VS Argument" /><published>2022-10-29T00:00:00+09:00</published><updated>2022-10-29T00:00:00+09:00</updated><id>https://daejoon.github.io/2022/10/29/parameter-vs-argument</id><content type="html" xml:base="https://daejoon.github.io/2022/10/29/parameter-vs-argument/"><![CDATA[<blockquote>
  <p>별개 다 혼동되어서 정리한다.</p>
</blockquote>

<h2 id="예제">예제</h2>

<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">ParameterAndArgument</span> <span class="o">{</span>

    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">printHello</span><span class="o">(</span><span class="nc">String</span> <span class="n">message</span><span class="o">)</span> <span class="o">{</span>

        <span class="nc">System</span><span class="o">.</span><span class="na">output</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Hello "</span> <span class="o">+</span> <span class="n">message</span><span class="o">);</span>
    <span class="o">}</span>

    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">()</span> <span class="o">{</span>

        <span class="kd">final</span> <span class="nc">String</span> <span class="n">message</span> <span class="o">=</span> <span class="s">"world"</span><span class="o">;</span>
        <span class="k">new</span> <span class="nf">ParameterAndArgument</span><span class="o">().</span><span class="na">printHello</span><span class="o">(</span><span class="n">message</span><span class="o">);</span>
    <span class="o">}</span>

<span class="o">}</span>
</code></pre></div></div>

<h2 id="parameter-매개변수">Parameter (매개변수)</h2>

<ul>
  <li>예제 에서 <code class="language-plaintext highlighter-rouge">message</code> 변수 이게 parameter 이다.</li>
</ul>

<h2 id="argument-전달인자">Argument (전달인자)</h2>

<ul>
  <li>예제 에서 전달되는 <code class="language-plaintext highlighter-rouge">world</code> 값 이게 argument 이다.</li>
</ul>

<h2 id="참고">참고</h2>

<ul>
  <li><a href="https://ko.wikipedia.org/wiki/%EB%A7%A4%EA%B0%9C%EB%B3%80%EC%88%98_(%EC%BB%B4%ED%93%A8%ED%84%B0_%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D)">매개변수 (컴퓨터 프로그래밍)</a></li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="혼동되는것" /><category term="java" /><summary type="html"><![CDATA[별개 다 혼동되어서 정리한다.]]></summary></entry><entry><title type="html">RequestMapping의 Consumes와 Produces</title><link href="https://daejoon.github.io/2022/08/12/RequestMapping%EC%9D%98-consumes-produces/" rel="alternate" type="text/html" title="RequestMapping의 Consumes와 Produces" /><published>2022-08-12T00:00:00+09:00</published><updated>2022-08-12T00:00:00+09:00</updated><id>https://daejoon.github.io/2022/08/12/RequestMapping%EC%9D%98-consumes-produces</id><content type="html" xml:base="https://daejoon.github.io/2022/08/12/RequestMapping%EC%9D%98-consumes-produces/"><![CDATA[<blockquote>
  <p>사용할때마다 너무 헷갈린다. 그래서 정리해봤다.</p>
</blockquote>

<h2 id="consumes">consumes</h2>

<ul>
  <li>@RequestMapping 류에서 사용되며 요청을 제한한다.</li>
  <li>클라이언트가 요청시 Content-Type 헤더를 통해서 서버에 전달한다.</li>
  <li><code class="language-plaintext highlighter-rouge">Content-Type=application/json</code>이면 클라이언트가 서버에 요청할때 내가 보내는 요청 정보는 <code class="language-plaintext highlighter-rouge">application/json</code>입니다. 라는 의미이다.</li>
</ul>

<h2 id="produces">produces</h2>

<ul>
  <li>@RequestMapping 류에서 사용되며 응답을 제한한다.</li>
  <li>클라이언트가 요청시 Accept 헤더를 통해서 서버에 전달한다.</li>
  <li><code class="language-plaintext highlighter-rouge">Accept=application/json</code>이면 서버가 응답하는 형식은 <code class="language-plaintext highlighter-rouge">application/json</code> 형식을 기대한다는 것이다.</li>
</ul>

<h2 id="개인적-추천">개인적 추천</h2>

<ul>
  <li>모든 요청과 응답에 대해서 정확하게 지정하는게 맞겠으나 개인적으로 consumes은 지정하는 편이고 produces는 지정하지 않는 편이다.</li>
</ul>

<h2 id="참고">참고</h2>

<ul>
  <li><a href="https://2ham-s.tistory.com/292">@RequestMapping의 produces,Content-Type,Consumes란?</a></li>
</ul>]]></content><author><name>Software Engineer</name><email>kkode1911@gmail.com</email></author><category term="혼동되는것" /><category term="spring" /><category term="java" /><summary type="html"><![CDATA[사용할때마다 너무 헷갈린다. 그래서 정리해봤다.]]></summary></entry></feed>