<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>sigint_107.log</title>
        <link>https://velog.io/</link>
        <description>꾸준함.</description>
        <lastBuildDate>Thu, 26 Dec 2024 04:43:57 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>sigint_107.log</title>
            <url>https://images.velog.io/images/sigint_107/profile/5e23ba5a-9b28-492d-9d4d-4f0bc842e816/social.png</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. sigint_107.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/sigint_107" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[AWS services]]></title>
            <link>https://velog.io/@sigint_107/AWS-services</link>
            <guid>https://velog.io/@sigint_107/AWS-services</guid>
            <pubDate>Thu, 26 Dec 2024 04:43:57 GMT</pubDate>
            <description><![CDATA[<h1 id="data-lambda-architecture">Data Lambda Architecture</h1>
<h2 id="abstraction">Abstraction</h2>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/d2f349d0-4b7a-4b01-9706-338a5abe28b1/image.png" alt=""></p>
<h1 id="data-collecting">Data Collecting</h1>
<h2 id="ec2">EC2</h2>
<ul>
<li>instance environment</li>
<li>regional option</li>
<li>Persisting Volume permanently by Amazon EBS </li>
<li>Providing EIP for static IPv4 address<h2 id="s3">S3</h2>
<h4 id="bucket">Bucket</h4>
</li>
<li>all of the instances are belongs to some buckets like folder in Windows</li>
<li>Container for instances.<h4 id="objects">Objects</h4>
</li>
<li>smallest concept in S3</li>
<li>An object consist of object data and meta data.</li>
</ul>
<h2 id="rds">RDS</h2>
<ul>
<li>Support relational database.</li>
</ul>
<h1 id="api-gateway">API Gateway.</h1>
<ul>
<li>bridging from external service to internal AWS services. </li>
<li>supporting consistance accessing methods from and to web, mobile.</li>
</ul>
<h1 id="cloud-watch">Cloud Watch</h1>
<ul>
<li><h1 id="kinesis-streamer">Kinesis Streamer</h1>
<h1 id="amazon-pinpoint">Amazon Pinpoint</h1>
<h1 id="real-time-processing">Real-Time Processing</h1>
<h3 id="real-time-item-recommenation">real-time item recommenation</h3>
</li>
<li>Spark Streaming</li>
<li>Flink (Kinesis Analysis)<ul>
<li>real-time analysis.</li>
</ul>
</li>
</ul>
<h1 id="amazon-es">Amazon ES</h1>
<h1 id="data-catalogingaws-glue">Data Cataloging(AWS glue)</h1>
]]></description>
        </item>
        <item>
            <title><![CDATA[@Mock & @Injectmocks]]></title>
            <link>https://velog.io/@sigint_107/Mock-Injectmocks</link>
            <guid>https://velog.io/@sigint_107/Mock-Injectmocks</guid>
            <pubDate>Sun, 23 Jun 2024 05:08:29 GMT</pubDate>
            <description><![CDATA[<h1 id="mock-objects">Mock Objects</h1>
<p>Mock objects are simulated objects that mimic the behavior of real objects in a controlled way. They are used in unit testing to isolate the unit of code being tested from its dependencies, ensuring that the tests are focused solely on the behavior of the unit under test.</p>
<h1 id="benefits-of-using-mock-objects">Benefits of Using Mock Objects:</h1>
<ul>
<li>Isolation: They isolate the unit of code from external dependencies.</li>
<li>Control: They allow you to define the behavior of dependencies in a predictable manner.</li>
<li>Performance: They are lightweight and faster than real objects, especially when the real objects involve I/O operations.</li>
<li>Simplification: They simplify testing by allowing you to simulate different scenarios and edge cases.</li>
</ul>
<h1 id="mock-annotation">@Mock Annotation</h1>
<p>The @Mock annotation is used in unit testing to create mock instances of classes. It is provided by mocking frameworks such as Mockito. When you annotate a field with @Mock, Mockito creates a mock instance of that field&#39;s type and injects it into the field.</p>
<pre><code>@Mock
private SomeDependency someDependency;
</code></pre><h1 id="injectmocks-annotation">@InjectMocks Annotation</h1>
<p>The @InjectMocks annotation is used to automatically inject mock objects into the class instance that is being tested. This annotation is provided by Mockito and simplifies the setup of test scenarios where the class under test has dependencies that need to be mocked.</p>
<p>How It Works:</p>
<ul>
<li>Mockito scans the class for dependencies (fields that can be injected).</li>
<li>It then looks for matching mock objects and injects them into the class.</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[StepContribution & ChunkContext]]></title>
            <link>https://velog.io/@sigint_107/StepContribution-ChunkContext</link>
            <guid>https://velog.io/@sigint_107/StepContribution-ChunkContext</guid>
            <pubDate>Sun, 23 Jun 2024 04:57:28 GMT</pubDate>
            <description><![CDATA[<h1 id="stepcontribution">StepContribution</h1>
<p>&#39;StepContribution&#39; is a class in the Spring Batch framework that represents the contribution of a Step to the overall processing. It provides a way to collect and report statistics during the execution of a step, such as the number of items read, written, and processed.</p>
<p>In the context of a Tasklet, which is a step in a Spring Batch job, StepContribution can be used to update the step&#39;s execution context, handle errors, and manage rollback scenarios.</p>
<p>Mocking StepContribution in the test allows you to simulate its behavior without having to rely on the actual Spring Batch infrastructure. This is useful for isolating the logic of the AddPassesTasklet and ensuring the test is focused solely on the logic you want to verify.</p>
<h1 id="chunkcontext">ChunkContext</h1>
<p>ChunkContext is another class in the Spring Batch framework that holds the context information for a chunk in a chunk-oriented step. It provides access to the StepContext, which holds contextual information about the current step execution, and allows sharing data across different chunks of the same step.</p>
<p>In chunk-oriented processing, a chunk is a set of items that are read, processed, and written together. ChunkContext provides the necessary context to manage this processing and maintain state between chunks.</p>
<p>Mocking ChunkContext in the test allows you to control and simulate the chunk&#39;s execution context without needing to execute a real batch job. This helps in testing the Tasklet logic in isolation.</p>
<p>In the provided test code, the annotations @Mock are used to create mock objects for StepContribution and ChunkContext. These are classes from the Spring Batch framework, and they play a role in the execution context of a batch job. Here&#39;s a detailed explanation of each:</p>
<p>StepContribution
StepContribution is a class in the Spring Batch framework that represents the contribution of a Step to the overall processing. It provides a way to collect and report statistics during the execution of a step, such as the number of items read, written, and processed.</p>
<p>In the context of a Tasklet, which is a step in a Spring Batch job, StepContribution can be used to update the step&#39;s execution context, handle errors, and manage rollback scenarios.</p>
<p>Mocking StepContribution in the test allows you to simulate its behavior without having to rely on the actual Spring Batch infrastructure. This is useful for isolating the logic of the AddPassesTasklet and ensuring the test is focused solely on the logic you want to verify.</p>
<p>ChunkContext
ChunkContext is another class in the Spring Batch framework that holds the context information for a chunk in a chunk-oriented step. It provides access to the StepContext, which holds contextual information about the current step execution, and allows sharing data across different chunks of the same step.</p>
<p>In chunk-oriented processing, a chunk is a set of items that are read, processed, and written together. ChunkContext provides the necessary context to manage this processing and maintain state between chunks.</p>
<p>Mocking ChunkContext in the test allows you to control and simulate the chunk&#39;s execution context without needing to execute a real batch job. This helps in testing the Tasklet logic in isolation.</p>
<p>Example Use in Test
By mocking these classes, you can simulate the execution environment of a Spring Batch job without actually running a full job. This makes the test faster and more focused on the specific behavior of the AddPassesTasklet.</p>
<p>Here’s how these mocks are set up and used in the test:</p>
<pre><code>@Mock
private StepContribution stepContribution;

@Mock
private ChunkContext chunkContext;

@InjectMocks
private AddPassesTasklet addPassesTasklet;
</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[Registrating the Google Auth into the Spring boot application.]]></title>
            <link>https://velog.io/@sigint_107/Registrating-the-Google-Auth-into-the-Spring-boot-application</link>
            <guid>https://velog.io/@sigint_107/Registrating-the-Google-Auth-into-the-Spring-boot-application</guid>
            <pubDate>Sat, 22 Jun 2024 00:57:56 GMT</pubDate>
            <description><![CDATA[<h1 id="disabling-csrf-and-frame-options">Disabling CSRF and Frame Options:</h1>
<pre><code>http
    .csrf().disable()
    .headers().frameOptions().disable()</code></pre><ul>
<li>csrf().disable(): Disables Cross-Site Request Forgery protection.</li>
<li>headers().frameOptions().disable(): Disables frame options to allow using the H2 console within a frame.</li>
</ul>
<h1 id="configuring-url-based-authorization">Configuring URL-Based Authorization:</h1>
<pre><code>.and()
    .authorizeRequests()
    .antMatchers(&quot;/&quot;, &quot;/css/**&quot;, &quot;/images/**&quot;, &quot;/js/**&quot;, &quot;/h2-console/**&quot;, &quot;/profile&quot;).permitAll()
    .antMatchers(&quot;/api/v1/**&quot;).hasRole(Role.USER.name())
    .anyRequest().authenticated()
</code></pre><ul>
<li>authorizeRequests(): Starts configuring URL-based access management.</li>
<li>antMatchers(&quot;/&quot;, &quot;/css/<strong>&quot;, &quot;/images/</strong>&quot;, &quot;/js/<strong>&quot;, &quot;/h2-console/</strong>&quot;, &quot;/profile&quot;).permitAll(): Allows unrestricted access to the specified URLs.</li>
<li>antMatchers(&quot;/api/v1/**&quot;).hasRole(Role.USER.name()): Requires users to have the USER role to access URLs starting with /api/v1/.</li>
<li>anyRequest().authenticated(): Requires all other URLs to be accessible only to authenticated (logged-in) users.</li>
</ul>
<h1 id="entire-source">entire source</h1>
<pre><code> @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
                .csrf().disable()
                .headers().frameOptions().disable() // Disables these options to use the H2 console screen.
                .and()
                .authorizeRequests() // The starting point for setting URL-specific access management.
                .antMatchers(&quot;/&quot;, &quot;/css/**&quot;, &quot;/images/**&quot;, &quot;/js/**&quot;, &quot;/h2-console/**&quot;, &quot;/profile&quot;).permitAll()
                // Specifies the targets for access management.
                // Allows management by URL and HTTP method.
                // Grants full access to the specified URLs such as &#39;/&#39; through the permitAll() option.
                .antMatchers(&quot;/api/v1/**&quot;).hasRole(Role.USER.name())
                // Only users with the USER role can access APIs with the &quot;/api/v1/**&quot; address.
                .anyRequest().authenticated()
                // Refers to the remaining URLs not specified.
                // Adds authenticated() to require login for all remaining URLs.
                .and()
                .logout()
                .logoutSuccessUrl(&quot;/&quot;)
                .and()
                .oauth2Login()
                .userInfoEndpoint()
                // Manages settings for retrieving user information after a successful OAuth2 login.
                .userService(customOAuth2UserService);
        // Registers the implementation of the UserService interface to handle post-login actions.
        // You can specify additional functions to proceed after retrieving user information from the resource server (i.e., social services).
    }</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[Spring @Test  추가시 import path중요]]></title>
            <link>https://velog.io/@sigint_107/Spring-Test-%EC%B6%94%EA%B0%80%EC%8B%9C-import-path%EC%A4%91%EC%9A%94</link>
            <guid>https://velog.io/@sigint_107/Spring-Test-%EC%B6%94%EA%B0%80%EC%8B%9C-import-path%EC%A4%91%EC%9A%94</guid>
            <pubDate>Sun, 16 Jun 2024 08:24:15 GMT</pubDate>
            <description><![CDATA[<p>해당 경로 아래에 있는 Test를 추가해야 한다. 아닐경우 Entity와 repository를 추가할 수 없는 경우가 생긴다. </p>
<pre><code>import org.junit.jupiter.api.Test;</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[Truncate VS Delete?]]></title>
            <link>https://velog.io/@sigint_107/Truncate-VS-Delete</link>
            <guid>https://velog.io/@sigint_107/Truncate-VS-Delete</guid>
            <pubDate>Tue, 14 May 2024 06:23:58 GMT</pubDate>
            <description><![CDATA[<h1 id="truncate">TRUNCATE</h1>
<ul>
<li><h3 id="모든-row를-지우는-경우">모든 Row를 지우는 경우</h3>
</li>
<li><h3 id="auto-increment-reset">Auto-Increment reset</h3>
</li>
<li><h3 id="roll-back-불가">Roll back 불가</h3>
</li>
<li><h3 id="perform-bulk-operation--faster-than-delete-cmd">Perform bulk operation &amp; faster than &#39;DELETE&#39; cmd</h3>
</li>
<li><h3 id="cannot-be-used-with-a-where-clause">Cannot be used with a where clause</h3>
</li>
</ul>
<pre><code>TRUNCATE TABLE your_table_name;
</code></pre><h1 id="delete">DELETE</h1>
<ul>
<li><h3 id="removes-one-or-more-rows-from-a-table-based-on-a-specified-condition">Removes one or more rows from a table based on a specified condition.</h3>
</li>
<li><h3 id="is-slower-than-truncate-especially-for-large-tables-as-it-processes-each-row-individually">Is slower than TRUNCATE, especially for large tables, as it processes each row individually.</h3>
</li>
<li><h3 id="can-be-rolled-back-within-a-transaction-allowing-for-data-recovery-in-case-of-mistakes">Can be rolled back within a transaction, allowing for data recovery in case of mistakes.</h3>
</li>
<li><h3 id="activates-triggers-if-they-are-defined-on-the-table">Activates triggers if they are defined on the table.</h3>
</li>
<li><h3 id="can-be-used-with-a-where-clause-to-delete-specific-rows">Can be used with a WHERE clause to delete specific rows.</h3>
</li>
</ul>
<pre><code>DELETE FROM your_table_name WHERE condition;</code></pre><p>or</p>
<pre><code>BEGIN TRANSACTION;

DELETE FROM table1;
DELETE FROM table2;
-- Repeat for other tables

COMMIT;</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[406 error [not accepterble]]]></title>
            <link>https://velog.io/@sigint_107/406-error-not-accepterble</link>
            <guid>https://velog.io/@sigint_107/406-error-not-accepterble</guid>
            <pubDate>Mon, 22 Apr 2024 12:53:59 GMT</pubDate>
            <description><![CDATA[<h1 id="클라이언트에서-요청된-type을-핸들러가-type으로-내려줄-수-없어-발생한-에러">클라이언트에서 요청된 Type을 핸들러가 type으로 내려줄 수 없어 발생한 에러</h1>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/adb9f0fb-5aa7-4e5e-a72d-46848c932a63/image.png" alt=""></p>
<pre><code>Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation]</code></pre><p><img src="https://velog.velcdn.com/images/sigint_107/post/1f3dee1f-2427-4376-8056-5c733e212c74/image.png" alt=""></p>
<h1 id="해결">해결</h1>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/fe526017-3bd2-4165-bd81-9f5ec674e45b/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Spring boots에서 테스트가 작동하지 않는경우]]></title>
            <link>https://velog.io/@sigint_107/Spring-boots%EC%97%90%EC%84%9C-%ED%83%9C%EC%8A%A4%ED%8A%B8%EA%B0%80-%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94%EA%B2%BD%EC%9A%B0</link>
            <guid>https://velog.io/@sigint_107/Spring-boots%EC%97%90%EC%84%9C-%ED%83%9C%EC%8A%A4%ED%8A%B8%EA%B0%80-%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94%EA%B2%BD%EC%9A%B0</guid>
            <pubDate>Wed, 17 Apr 2024 13:15:40 GMT</pubDate>
            <description><![CDATA[<h1 id="비워져-있는-테스트케이스를-실행하자-class-not-found-error가-발생-하였다">비워져 있는 테스트케이스를 실행하자 class not found error가 발생 하였다.</h1>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/e1b20c11-0746-4883-8f34-46ff476175f0/image.png" alt="">
<img src="https://velog.velcdn.com/images/sigint_107/post/689c91ef-568e-4dec-b0de-0b45610544b3/image.png" alt=""></p>
<h1 id="위의-캡쳐같이-group을-테스트-클래스가-위치한-패키지를-적어줘야-한다">위의 캡쳐같이 group을 테스트 클래스가 위치한 패키지를 적어줘야 한다.</h1>
<h2 id="이후에-실행하자-테스트케이스가-잘-실행-되는것을-확인-할-수-있었다">이후에 실행하자 테스트케이스가 잘 실행 되는것을 확인 할 수 있었다.</h2>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/1c42db2b-6b12-4bb0-971d-0ac1739bf3c0/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[GROUP BY 완전정복]]></title>
            <link>https://velog.io/@sigint_107/GROUP-BY-%EC%99%84%EC%A0%84%EC%A0%95%EB%B3%B5</link>
            <guid>https://velog.io/@sigint_107/GROUP-BY-%EC%99%84%EC%A0%84%EC%A0%95%EB%B3%B5</guid>
            <pubDate>Thu, 04 Apr 2024 00:56:24 GMT</pubDate>
            <description><![CDATA[<h1 id="기본적인-group-by절">기본적인 GROUP BY절</h1>
<pre><code>select
    pcb.id
    ,count(pcb.total_component_count) as count
from ks_inspection_result.t_result_aoi_pcb pcb
group by pcb.id
</code></pre><h3 id="group-by-절의-칼럼은-select-절에-존재해야-사용할-수-있다">GROUP BY 절의 칼럼은 SELECT 절에 존재해야 사용할 수 있다.</h3>
<h3 id="select-절에서-집계-함수를-제외한-칼럼을-group-by-절에-기술한다고-생각하면-된다">**SELECT 절에서 집계 함수를 제외한 칼럼을 GROUP BY 절에 기술한다고 생각하면 된다.</h3>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/1c999047-fd91-4b36-af0e-feb6700832f1/image.png" alt=""></p>
<h1 id="group을-여러개-지정하는-경우">Group을 여러개 지정하는 경우.</h1>
<pre><code>select
    pcb.id
     ,wfmi.array_value
    ,count(wfmi.pcb_id) as count
from ks_inspection_result.t_result_aoi_pcb pcb
left join ks_inspection_result.t_aoi_whole_wfmi_result wfmi
    on pcb.id = wfmi.pcb_id
group by pcb.id, wfmi.array_value
having count(wfmi.pcb_id) &gt; 0 and wfmi.array_value &gt; 0</code></pre><p>pcb.id로 먼저 묶이고, wfmi.array_value로 한번 더 묶인다.
<img src="https://velog.velcdn.com/images/sigint_107/post/578931af-6496-45f9-905e-dc5b97e68f37/image.png" alt=""></p>
<h1 id="using-order-by">Using Order By</h1>
<pre><code>select
    pcb.id
     ,wfmi.array_value as arrayNum
    ,count(wfmi.pcb_id) as count
from ks_inspection_result.t_result_aoi_pcb pcb
left join ks_inspection_result.t_aoi_whole_wfmi_result wfmi
    on pcb.id = wfmi.pcb_id
group by pcb.id, wfmi.array_value
having count(wfmi.pcb_id) &gt; 0 and wfmi.array_value &gt; 0
order by count desc</code></pre><p>order By절에서 집계함수절을 사용할수 있다.</p>
<p><img src="https://velog.velcdn.com/images/sigint_107/post/c518f156-c75e-44cb-a948-8b5242dd5d2e/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Exception while fetching data [QueryDsl]]]></title>
            <link>https://velog.io/@sigint_107/Exception-while-fetching-data-QueryDsl</link>
            <guid>https://velog.io/@sigint_107/Exception-while-fetching-data-QueryDsl</guid>
            <pubDate>Mon, 25 Mar 2024 06:58:20 GMT</pubDate>
            <description><![CDATA[<h3 id="결론-querydsl-query에-reflection으로-사용되는-dto는-noargsconstructor가-필요하다">결론 QueryDsl query에 reflection으로 사용되는 DTO는 @NoArgsConstructor가 필요하다.</h3>
<pre><code>2024-03-25 14:53:56.870  WARN 1294449 --- [nio-8081-exec-4] n.g.e.SimpleDataFetcherExceptionHandler  : Exception while fetching data (/aoiWfmiCountList) : com.kohyoung.ksmart.web.dto.AoiWfmiDto
</code></pre><ul>
<li>Many Java frameworks and libraries use reflection to dynamically create instances of classes. Reflection is a powerful feature that allows a program to manipulate attributes and behaviors of objects at runtime. For instance, when QueryDSL fetches data from the database and maps it to a DTO (Data Transfer Object) like AoiWfmiDto, it doesn&#39;t use the constructor you&#39;ve written. Instead, it uses reflection to instantiate the class without calling any constructor explicitly.</li>
</ul>
<h1 id="querydsl은-reflection사용시-어떤-필드가-들어올-지-모르기-때문에-일단-비어있는-객체를-생성한다--no-args-condtructor">QueryDsl은 reflection사용시 어떤 필드가 들어올 지 모르기 때문에 일단 비어있는 객체를 생성한다 (= no args condtructor)</h1>
<h1 id="일단-비어져-있는-객체를-생성하면-db에서-필요한-정보를-relfection에-맞게-뽑아-사용한다">일단 비어져 있는 객체를 생성하면 DB에서 필요한 정보를 relfection에 맞게 뽑아 사용한다.</h1>
]]></description>
        </item>
        <item>
            <title><![CDATA[Hexagonal Architecture]]></title>
            <link>https://velog.io/@sigint_107/Hexagonal-Architecture</link>
            <guid>https://velog.io/@sigint_107/Hexagonal-Architecture</guid>
            <pubDate>Sun, 24 Mar 2024 09:11:17 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/sigint_107/post/0085bd86-138c-4752-9508-5049d6019d43/image.png" alt=""></p>
<h1 id="hexagonal-architecture">Hexagonal Architecture.</h1>
<h2 id="도메인-중심-아키텍처의-일종">도메인 중심 아키텍처의 일종</h2>
<ul>
<li>UI나 database를 비지니스 로직으로 분리되어야하는 외부요소로 취급함</li>
<li>비지니스 로직(도메인 코드)이 외부요소에 의해 의존하지 않게 함</li>
<li>프레젠테이션 계층(controller)과 데이터 소스 계층(persistence)이 도메인 계층에 의존하도록 함</li>
<li>외부에 포함된 컴포넌트는 어댑터이고, 어댑터가 내부와 상호작용하는 부분이 포트임</li>
</ul>
<h1 id="msa에서-불려지는-구조">MSA에서 불려지는 구조</h1>
<h3 id="1-controller-웹-컨트롤러">1. Controller (=웹 컨트롤러)</h3>
<h3 id="2-usecaseclass">2. UseCase.class</h3>
<h4 id="--service클래스가-usecaseclass를-구현한다">- SERVICE클래스가 UseCase.class를 구현한다.</h4>
<h3 id="3-port-class">3. port class</h3>
<h3 id="4-core-buisiness-logic">4. Core(= buisiness logic)</h3>
<h3 id="5-domain-entity">5. domain entity</h3>
<h4 id="--현재-플젝에서는-membershipjpaentity">- 현재 플젝에서는 MembershipJpaEntity</h4>
<h1 id="구조">구조</h1>
<h3 id="1-adapter플러그인">1. Adapter(플러그인)</h3>
<ul>
<li>driving adapter(주도하는 어댑터): 애플리케이션 코어를 호출함
웹, 외부 시스템 어댑터 ex) Controller</li>
<li>driven adapter(주도되는 어댑터): 애플리케이션 코어에 의해 호출됨
영속성, 외부 시스템 어댑터 ex)</li>
</ul>
<h4 id="현재-진행중인-msa프로젝트는-adapter가-port-interface에-명시되어-있는-메소드들을-구현하였다">현재 진행중인 MSA프로젝트는 Adapter가 port interface에 명시되어 있는 메소드들을 구현하였다.</h4>
<pre><code>

public class MembershipPersistenceAdapter implements RegisterMembershipPort, FindMembershipPort {
    private final MembershipRepository membershipRepository;
    @Override
    public MembershipJpaEntity createMembership(Membership.MembershipName name,
    Membership.MembershipAddress address,
    Membership.MembershipEmail email,
    Membership.MembershipValid valid,
    Membership.MembershipCorp corp) {

       return membershipRepository.save(
               new MembershipJpaEntity(
                       name.getName()
                       , address.getAddress()
                       , email.getEmail()
                       , valid.isValid()
                       , corp.isCorp())
       );
    }

    @Override
    public MembershipJpaEntity findMembership(Membership.MembershipId membershipId) {
        return membershipRepository.getById(membershipId.getId());
    }
}
</code></pre><h3 id="2-port통로--애플리케이션-코어와-어댑터-간에-통신을-위한-부분으로-인터페이스로-구성한다">2. Port(통로) : 애플리케이션 코어와 어댑터 간에 통신을 위한 부분으로 인터페이스로 구성한다.</h3>
<ul>
<li>In Port(인바운드 포트): 외부에서 Adapter를 통해 들어온 요청을 처리하는 인터페이스 ex) Service I/F</li>
<li>Out Port(아웃바운드 포트): 내부에서 외부의 기술이나 서비스를 사용하기 위한 인터페이스</li>
</ul>
<h4 id="--port클래스는-코어에-필요한-메소드들을-명시만-하고-adapter클래스들이-구현한다">- port클래스는 코어에 필요한 메소드들을 명시만 하고 Adapter클래스들이 구현한다.</h4>
<h3 id="3-application-core-도메인-엔티티-유즈케이스">3. Application Core: 도메인 엔티티, 유즈케이스.</h3>
<p>모든 의존성은 코어를 향함</p>
<h3 id="계층-구성">계층 구성</h3>
<ul>
<li>어댑터 계층: ex) web 어댑터(=웹 컨트롤러), persistence 어댑터</li>
<li>애플리케이션 계층: 포트와 서비스를 포함하는 곳</li>
<li>포트: 서비스에서 구현될 인터페이스</li>
<li><ul>
<li>input port/output port</li>
</ul>
</li>
<li>서비스</li>
<li><ul>
<li>포트 구현체(=유스케이스 구현체)</li>
</ul>
</li>
<li>도메인 계층
-- 도메인 엔티티</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[IntelliJ spring project를 github에 push하기]]></title>
            <link>https://velog.io/@sigint_107/IntelliJ-spring-project%EB%A5%BC-github%EC%97%90-push%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@sigint_107/IntelliJ-spring-project%EB%A5%BC-github%EC%97%90-push%ED%95%98%EA%B8%B0</guid>
            <pubDate>Sun, 17 Mar 2024 05:47:05 GMT</pubDate>
            <description><![CDATA[<h1 id="step-1-initialize-a-git-repository">Step 1: Initialize a Git Repository</h1>
<ul>
<li><p>Open your project in IntelliJ IDEA.</p>
</li>
<li><p>If you haven&#39;t already initialized your project as a Git repository, - go to VCS &gt; Enable Version Control Integration from the top menu.</p>
</li>
<li><p>Choose Git from the list and click OK.</p>
<h1 id="step-2-commit-your-project-to-the-local-repository">Step 2: Commit Your Project to the Local Repository</h1>
</li>
<li><p>Go to VCS &gt; Commit (or use the Ctrl+K shortcut).
In the Commit Changes dialog, select the files you want to commit. It&#39;s a good practice to review the changes and ensure temporary or unnecessary files (like build outputs) are not included. IntelliJ&#39;s .gitignore file can help with this.</p>
</li>
<li><p>Write a commit message that describes the changes you&#39;re making.</p>
</li>
<li><p>Click the Commit button. You can choose Commit and Push if you&#39;re - ready to push your changes directly after committing, but assuming this is the first commit, just a commit is sufficient for now.</p>
<h1 id="step-3-create-a-new-repository-on-github">Step 3: Create a New Repository on GitHub</h1>
</li>
<li><p>Go to GitHub and log in.</p>
</li>
<li><p>Click on the + icon in the upper-right corner and select New repository.</p>
</li>
<li><p>Name your repository, add a description if you want, and decide if you want the repository to be public or private.</p>
</li>
<li><p>Click Create repository. Do not initialize the repository with a README, .gitignore, or license. Since you&#39;re pushing an existing project, you&#39;ll want to leave the repository empty.</p>
<h1 id="step-4-link-your-local-repository-to-github">Step 4: Link Your Local Repository to GitHub</h1>
</li>
<li><p>Inside the terminal, type the following command to add the GitHub repository as a remote to your project:</p>
<ul>
<li>Replace <REPOSITORY_URL> with the URL you copied from GitHub.</li>
</ul>
</li>
</ul>
<pre><code>git remote add origin &lt;REPOSITORY_URL&gt;</code></pre><h1 id="step-5-push-your-project-to-github">Step 5: Push Your Project to GitHub</h1>
<p>Still in the IntelliJ Terminal, push your project to GitHub with the </p>
<pre><code>git branch -M main

git push -u origin master</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[git reset, revert로 이전 커밋으로 돌리기]]></title>
            <link>https://velog.io/@sigint_107/git-reset-revert%EB%A1%9C-%EC%9D%B4%EC%A0%84-%EC%BB%A4%EB%B0%8B%EC%9C%BC%EB%A1%9C-%EB%8F%8C%EB%A6%AC%EA%B8%B0</link>
            <guid>https://velog.io/@sigint_107/git-reset-revert%EB%A1%9C-%EC%9D%B4%EC%A0%84-%EC%BB%A4%EB%B0%8B%EC%9C%BC%EB%A1%9C-%EB%8F%8C%EB%A6%AC%EA%B8%B0</guid>
            <pubDate>Fri, 26 Jan 2024 05:19:41 GMT</pubDate>
            <description><![CDATA[<h1 id="이-작업을-하는-이유">이 작업을 하는 이유</h1>
<p>단편적인 예로 이전 돌아가고 싶은 커밋으로 가고 싶을 때 사용하거나, master 브랜치로 릴리즈를 했는데 치명적인 버그로 인하여 롤백해야하는 경우 이전 커밋으로 되돌아가기 위해 위 명령어를 사용합니다!</p>
<h1 id="reset-revert-차이">reset, revert 차이</h1>
<p>둘다 이전 커밋으로 되돌린다는 점에서는 동일하나</p>
<p>github 같은 온라인 저장소에 올라가 다른 사람간 코드 공유의 유(revert)무(reset)에 따라서 달라집니다.</p>
<h1 id="reset">reset</h1>
<p>origin에 올리지 않고 로컬에 커밋이 머물렀다면, 올라갔어도 나만 해당 브랜치를 사용한다면 reset를 쓰셔도 좋습니다.</p>
<p>사용법은 git reset --option 돌아갈 커밋입니다.</p>
<p>아래 예시로 알아보겠습니다.</p>
<h2 id="1-commit을-여러번-합니다">1. commit을 여러번 합니다.</h2>
<pre><code>git commit -m &quot;1&quot;
git commit -m &quot;2&quot;
git commit -m &quot;3&quot;</code></pre><h2 id="2-commit을-바로-이전-상황으로-돌립니다">2. commit을 바로 이전 상황으로 돌립니다.</h2>
<pre><code>git reset HEAD^</code></pre><h2 id="3여러개의-commit-이전으로-돌리는-경우">3.여러개의 commit 이전으로 돌리는 경우</h2>
<pre><code>git reset HEAD~2
</code></pre><ul>
<li>커밋으로 되돌아갑니다.</li>
<li>HEAD~2 부분에 커밋 해쉬를 써도 되돌아갑니다.</li>
</ul>
<h1 id="reset-옵션">reset 옵션</h1>
<h3 id="--hard">--hard</h3>
<p>hard 옵션을 사용하면 돌아간 커밋 이후의 변경 이력은 모두 삭제합니다.</p>
<pre><code>git commit -m &quot;1&quot;
git commit -m &quot;2&quot;
git commit -m &quot;3&quot;

git reset --hard [1번commit hash]
git push</code></pre><ul>
<li>즉, 위처럼 실행할 경우 2, 3번 커밋 반영 내용은 모두 사라집니다. 물론 코드도 날아가지요.</li>
</ul>
<h3 id="--mixed">--mixed</h3>
<p>변경 이력은 모두 삭제하지만 변경 내용은 남아있습니다.</p>
<pre><code>git commit -m &quot;1&quot;
git commit -m &quot;2&quot;
git commit -m &quot;3&quot;

git reset --mixed [1번commit hash]
git add .
git commit -m &quot;~&quot;
git push</code></pre><ul>
<li>위처럼 실행할 경우 이력은 날아가나 unStage 상태로 코드는 남아있습니다. 코드를 반영하려면 add 명령어로 stage에 반영하고 commit 합니다.</li>
</ul>
<h3 id="--soft">--soft</h3>
<ul>
<li>변경 이력은 모두 삭제하지만 변경 내용은 남아있습니다. 그러나 stage 되어있습니다.<pre><code>git commit -m &quot;1&quot;
git commit -m &quot;2&quot;
git commit -m &quot;3&quot;
</code></pre></li>
</ul>
<p>git reset --soft [1번commit hash]
git commit -m &quot;~&quot;
git push</p>
<pre><code>- 즉, add명령어 필요없이 바로 commit 진행 가능합니다.

# origin에 올린 상태에서 reset하고 push 한다면?
- 로컬은 origin에 있는 commit을 삭제한 채로 origin에 덮으려고 하니 당연히 에러가 뜹니다.
- #### 이럴땐 --force 옵션을 주어 강제로 로컬 commit history를 origin commit history로 덮어씁니다. 즉, 만약 해당 리포를 다른 사람들과 공유하고 있다면 무조건 하시면 안되는 행동입니다.

- ### reset 사용하는 경우
위처럼 다른 사람간 코드가 공유될 때, reset를 사용하면 상상치도 못하는 헬게이트가 열립니다. 그러므로 reset를 사용하는 경우는 아래와 같습니다.

혼자만 사용하는 브랜치인 경우
origin에 있지만 아무도 이 브랜치를 사용하지 않는다는 확신을 가지는 경우
그 이외의 경우 commit을 되돌릴때 아래의 revert를 사용합니다.

# revert
- ## revert는 reset과 다르게 커밋을 삭제하는 것이 아닌 커밋을 추가합니다.

그러나 이전 커밋과 정반대의 데이터를 추가하는 방식으로 코드를 되돌립니다. revert 명령어는 reset --soft, mixed와 동일한 결과를 가져오지만 이력은 Revert &quot;...&quot;라는 메세지가 추가됩니다.
</code></pre><p>git commit -m &quot;1번 커밋&quot;
git commit -m &quot;2번 커밋&quot;
git commit -m &quot;3번 커밋&quot;</p>
<p>git revert [1번commit hash]</p>
<pre><code>

위처럼 명령어를 실행하면 1번 커밋 이후의 커밋들이 삭제되는 것이 아니라, 1번 커밋에 해당하는 내용만 삭제됩니다. 그리고 Revert &quot;1번 커밋&quot;이라는 커밋에는 1번 커밋이 삭제된 이력이 남게 되죠.

git log에는 아래와 같이 찍힙니다.</code></pre><p>Revert &quot;1번 커밋&quot;
3번 커밋
2번 커밋
1번 커밋</p>
<pre><code>

# 바로 커밋되게 하지 않으려면?
만약 revert한 결과를 stage 상태만 유지하고, commit 하지 않으려면 --no-commit 옵션을 추가합니다.</code></pre><p>git revert --no-commit [커밋 해쉬]</p>
<p>// 이후
git commit -m &quot;어떤 커밋을 왜 리버트했니?&quot;</p>
<p>git push</p>
<pre><code>

# 여러개 커밋을 되돌리려면?</code></pre><p>git revert [커밋해쉬]..[커밋해쉬]</p>
<pre><code>


git log에는</code></pre><p>git revert [1번커밋해쉬]..[2번커밋해쉬]
git log</p>
<p>Revert &quot;2번커밋해쉬&quot;
Revert &quot;1번커밋해쉬&quot;</p>
<p>```</p>
<p>revert는 되돌리는 커밋이 중간에 있을때 커밋 해쉬를 넣어서 중간 커밋만 삭제할 수 있고, 어떤 커밋이 왜 revert 됬는지 commit message를 통해 관찰 가능함으로 더욱 유용합니다.</p>
<p>또는 revert는 커밋은 삭제되는 것보다 이전으로 되돌리는 이력마저 남기는 것이 history 유지 차원에서 더 좋습니다.</p>
<p>그래서 revert 씁시다!</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Extends vs Implements [java]]]></title>
            <link>https://velog.io/@sigint_107/Extends-vs-Implements-java</link>
            <guid>https://velog.io/@sigint_107/Extends-vs-Implements-java</guid>
            <pubDate>Fri, 25 Aug 2023 09:28:15 GMT</pubDate>
            <description><![CDATA[<h3 id="extends는-상속받은-클래스의-fields나-methods들을-사용할-수-있다-extends를-사용하는건-extends-functionality로-해석할-수-있다">extends는 상속받은 클래스의 fields나 methods들을 사용할 수 있다. extends를 사용하는건 extends functionality로 해석할 수 있다.</h3>
<h4 id="--오직-한-클래스만-상속받을-수-있다다중상속이-불가능하다">- 오직 한 클래스만 상속받을 수 있다(다중상속이 불가능하다)</h4>
<pre><code>class One {
    public void methodOne()
    {

        // Some Functionality
    }
}

class Two extends One {

    public static void main(String args[])
    {
        Two t = new Two();

        // Calls the method one
        // of the above class
        t.methodOne();
    }
}</code></pre><h3 id="implements는-상속받은-methods들을구현해서-사용해야-하기-때문에-implements라고-한다">implements는 상속받은 methods들을구현해서 사용해야 하기 때문에 implements라고 한다..</h3>
<h4 id="--extends는-하나의-클래스만-가능하지만-implements는-상속-받는데-제한이-없다">- extends는 하나의 클래스만 가능하지만 implements는 상속 받는데 제한이 없다.</h4>
<pre><code>// Defining an interface
interface One {
    public void methodOne();
}

// Defining the second interface
interface Two {
    public void methodTwo();
}

// Implementing the two interfaces
class Three implements One, Two {
    public void methodOne()
    {

        // Implementation of the method
    }

    public void methodTwo()
    {

        // Implementation of the method
    }
}
</code></pre><pre><code>// Defining the interface
interface One {

    // Abstract method
    void methodOne();
}

// Defining a class
class Two {

    // Defining a method
    public void methodTwo()
    {
    }
}

// Class which extends the class Two
// and implements the interface One
class Three extends Two implements One {

    public void methodOne()
    {

        // Implementation of the method
    }
}</code></pre><h1 id="interface는-다중-extends가-가능하다">Interface는 다중 extends가 가능하다.</h1>
<pre><code>// Defining the interface One
interface One {
    void methodOne();
}

// Defining the interface Two
interface Two {
    void methodTwo();
}

// Interface extending both the
// defined interfaces
interface Three extends One, Two {
}
</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[restore sql dump]]></title>
            <link>https://velog.io/@sigint_107/restore-sql-dump</link>
            <guid>https://velog.io/@sigint_107/restore-sql-dump</guid>
            <pubDate>Fri, 18 Aug 2023 05:40:05 GMT</pubDate>
            <description><![CDATA[<h2 id="--로컬에서-mysql접속시에도-로컬-서버의-ip입력하고">- 로컬에서 mysql접속시에도 로컬 서버의 ip입력하고</h2>
<h2 id="--테이블명-말고-데이터-베이스만-입력하고">- 테이블명 말고 데이터 베이스만 입력하고</h2>
<h2 id="--p다음에-비밀번호-붙여서-입력하기">- p다음에 비밀번호 붙여서 입력하기</h2>
<pre><code>[root@ksmart ~]# mysql -h 10.2.11.111 -u root -pakstnanrkd123@ kmng &lt; server_equi.sql</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[Next.js에서 React hook의 Context를 사용하는 방법]]></title>
            <link>https://velog.io/@sigint_107/Next.js%EC%97%90%EC%84%9C-React-hook%EC%9D%98-Context%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95</link>
            <guid>https://velog.io/@sigint_107/Next.js%EC%97%90%EC%84%9C-React-hook%EC%9D%98-Context%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95</guid>
            <pubDate>Tue, 01 Aug 2023 02:51:19 GMT</pubDate>
            <description><![CDATA[<h1 id="필요한-library들">필요한 Library들</h1>
<pre><code>import React, { createContext, useContext, useReducer } from &#39;react&#39;;
import { todoReducer } from &#39;./TodoReducer&#39;; // Import the todoReducer 
</code></pre><h1 id="dispatcher에서-필요한-action정의">dispatcher에서 필요한 Action정의</h1>
<pre><code>type TodoAction = { type: &#39;CREATE&#39;; data: Todo };
</code></pre><h1 id="dispatcher에-필요되는-parameter값들-정의">dispatcher에 필요되는 parameter값들 정의.</h1>
<pre><code>interface TodoContextValue {
  tasks: Todo[];
  dispatch: React.Dispatch&lt;TodoAction&gt;;
  onCreate: (content: Todo) =&gt; void;
}
</code></pre><h3 id="--tasks-todo리스트를-구성하는-entity-리스트로-정의되어-있다">- tasks: Todo리스트를 구성하는 entity. 리스트로 정의되어 있다.</h3>
<h3 id="--dispatch-리액트-hook의-usereducer로-만들어진-함수">- dispatch: 리액트 Hook의 useReducer로 만들어진 함수</h3>
<h3 id="--oncreate--a-function-that-takes-a-todo-item-as-an-argument-and-is-used-to-add-a-new-todo-item-to-the-list">- onCreate : A function that takes a Todo item as an argument and is used to add a new Todo item to the list.</h3>
<h1 id="위에-정의한-todocontextvalue-interface를-기반으로-한-context를-생성">위에 정의한 TodoContextValue interface를 기반으로 한 Context를 생성.</h1>
<pre><code>export const TodoContext = createContext&lt;TodoContextValue&gt;({
  tasks: [],
  dispatch: () =&gt; {},
  onCreate: () =&gt; {},
});
</code></pre><h3 id="--default값이-정의된-함수들">- default값이 정의된 함수들.</h3>
<h4 id="--리스트일-경우-비어져-있는-리스트-함수는-비워져-있는-함수">- 리스트일 경우 비어져 있는 리스트, 함수는 비워져 있는 함수.</h4>
<h1 id="커스텀-훅을-생성후-export한다">커스텀 훅을 생성후 export한다.</h1>
<pre><code>export const useTodoContext = () =&gt; useContext(TodoContext);
</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[Different between _app.tsx and app.tsx?
]]></title>
            <link>https://velog.io/@sigint_107/where-should-I-create-app.tsx-also-what-is-the-different-between-app.tsx-and-app.tsx</link>
            <guid>https://velog.io/@sigint_107/where-should-I-create-app.tsx-also-what-is-the-different-between-app.tsx-and-app.tsx</guid>
            <pubDate>Wed, 12 Jul 2023 02:44:36 GMT</pubDate>
            <description><![CDATA[<h1 id="한줄요약">한줄요약</h1>
<h2 id="nextjs는-_apptsx를-쓰고-apptsx는-쓰지-않는다">next.js는 _app.tsx를 쓰고 app.tsx는 쓰지 않는다.</h2>
<h3 id="in-nextjs-_apptsx-and-apptsx-serve-different-purposes">In Next.js, _app.tsx and app.tsx serve different purposes.</h3>
<h3 id="_apptsx">_app.tsx:</h3>
<h4 id="the-_apptsx-file-is-a-special-file-in-nextjs-that-acts-as-the-root-component-for-your-application-it-is-responsible-for-initializing-global-styles-providing-data-fetching-and-state-management-providers-and-maintaining-the-overall-layout-and-structure-of-your-app">The _app.tsx file is a special file in Next.js that acts as the root component for your application. It is responsible for initializing global styles, providing data-fetching and state management providers, and maintaining the overall layout and structure of your app.</h4>
<h3 id="you-should-create-the-_apptsx-file-in-the-pages-directory">You should create the _app.tsx file in the pages/ directory.</h3>
<h3 id="heres-an-example-of-an-_apptsx-file">Here&#39;s an example of an _app.tsx file:</h3>
<h3 id="apptsx">app.tsx:</h3>
<h5 id="on-the-other-hand-apptsx-is-not-a-special-file-in-nextjs-it-does-not-have-any-specific-functionality-or-meaning-within-the-nextjs-framework">On the other hand, app.tsx is not a special file in Next.js. It does not have any specific functionality or meaning within the Next.js framework.</h5>
<h6 id="you-can-create-an-apptsx-file-if-you-have-a-specific-purpose-or-requirement-in-your-application-that-deviates-from-the-standard-nextjs-conventions-it-could-be-a-custom-component-a-utility-or-any-other-code-related-to-your-apps-functionality">You can create an app.tsx file if you have a specific purpose or requirement in your application that deviates from the standard Next.js conventions. It could be a custom component, a utility, or any other code related to your app&#39;s functionality.</h6>
<h6 id="you-can-create-the-apptsx-file-anywhere-in-your-projects-directory-structure-depending-on-your-desired-organization-and-file-structure">You can create the app.tsx file anywhere in your project&#39;s directory structure, depending on your desired organization and file structure.</h6>
<h2 id="to-summarize-_apptsx-is-a-special-file-in-nextjs-that-acts-as-the-root-component-of-your-application-while-apptsx-is-a-generic-file-that-you-can-create-for-custom-purposes-in-your-nextjs-project">To summarize, _app.tsx is a special file in Next.js that acts as the root component of your application, while app.tsx is a generic file that you can create for custom purposes in your Next.js project.</h2>
]]></description>
        </item>
        <item>
            <title><![CDATA[next.js기본 페이지들 개념정리]]></title>
            <link>https://velog.io/@sigint_107/next.js%EA%B8%B0%EB%B3%B8-%ED%8E%98%EC%9D%B4%EC%A7%80%EB%93%A4-%EA%B0%9C%EB%85%90%EC%A0%95%EB%A6%AC</link>
            <guid>https://velog.io/@sigint_107/next.js%EA%B8%B0%EB%B3%B8-%ED%8E%98%EC%9D%B4%EC%A7%80%EB%93%A4-%EA%B0%9C%EB%85%90%EC%A0%95%EB%A6%AC</guid>
            <pubDate>Tue, 04 Jul 2023 14:38:22 GMT</pubDate>
            <description><![CDATA[<h2 id="모든-페이지는-indextsx가-필요하다">모든 페이지는 index.tsx가 필요하다.</h2>
<h1 id="_apptsx-에서는-다음과-같은-일을-한다고-한다">_app.tsx 에서는 다음과 같은 일을 한다고 한다.</h1>
<ol start="0">
<li><p>This file is the entry point for your Next.js application and acts as a wrapper for all your pages.</p>
</li>
<li><p>It allows you to define global styles, layout components</p>
</li>
<li><p>provide functionality that should be accessible across all pages</p>
</li>
<li><p>Custom error handling using componentDidCatch</p>
</li>
<li><p>Inject additional data into pages</p>
</li>
<li><p>add global CSS</p>
<h3 id="파라메터-두개-있는데-뭐에-쓰이는-물건인고">파라메터 두개 있는데 뭐에 쓰이는 물건인고?</h3>
<ul>
<li></li>
</ul>
</li>
</ol>
<h2 id="_indextsx">_index.tsx</h2>
<h3 id="일종의-landing-page">일종의 Landing page.</h3>
<h3 id="_indextsx-this-file-is-a-specific-page-file-that-corresponds-to-the-root-url-of-your-application-eg--it-acts-as-the-landing-page-or-home-page-of-your-app-the-name-_indextsx-signifies-that-it-is-the-index-file-for-the-root-route">_index.tsx: This file is a specific page file that corresponds to the root URL of your application (e.g., /). It acts as the landing page or home page of your app. The name _index.tsx signifies that it is the index file for the root route.</h3>
]]></description>
        </item>
        <item>
            <title><![CDATA[don't we need to return _app.tsx in index.tsx file like react.js?]]></title>
            <link>https://velog.io/@sigint_107/dont-we-need-to-return-app.tsx-in-index.tsx-file-like-react.js</link>
            <guid>https://velog.io/@sigint_107/dont-we-need-to-return-app.tsx-in-index.tsx-file-like-react.js</guid>
            <pubDate>Sun, 25 Jun 2023 14:09:27 GMT</pubDate>
            <description><![CDATA[<p>In React.js, the convention is to return the root component (usually named App) from the index.js file using the ReactDOM.render() function. However, in Next.js, which is a framework built on top of React, the file structure and conventions are slightly different.</p>
<p>In a Next.js application, the entry point is typically the _app.js (or _app.tsx) file, which serves as the main wrapper component for your entire application. It is responsible for initializing global styles, setting up the layout, and handling any shared functionality across pages.</p>
<p>In the index.js (or index.tsx) file, you don&#39;t need to explicitly return the _app.js component. Instead, Next.js handles this internally. The index.js file usually represents the default page of your application, and Next.js automatically associates it with the _app.js component.</p>
<p>Here&#39;s an example of a typical Next.js directory structure:</p>
<pre><code>pages/
  |_ _app.js
  |_ index.js
</code></pre><p>In this case, the _app.js file would contain the root component, and the index.js file would be the default page that Next.js associates with the _app.js component.</p>
<p>So, to answer your question, in Next.js, you don&#39;t need to explicitly return the _app.js component from the index.js file. Next.js handles the integration of the root component internally.</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Export와 Export default의 차이점]]></title>
            <link>https://velog.io/@sigint_107/Export%EC%99%80-Export-default%EC%9D%98-%EC%B0%A8%EC%9D%B4%EC%A0%90</link>
            <guid>https://velog.io/@sigint_107/Export%EC%99%80-Export-default%EC%9D%98-%EC%B0%A8%EC%9D%B4%EC%A0%90</guid>
            <pubDate>Sun, 25 Jun 2023 10:20:14 GMT</pubDate>
            <description><![CDATA[<p>The export and export default are both ways to export declarations from a module in JavaScript or TypeScript, but they have some differences in their behavior and usage:</p>
<p>export: With the export keyword, you can selectively export one or more declarations (variables, functions, classes, etc.) from a module. You can export multiple declarations from a single module, and you can import them individually using the corresponding import syntax. Here&#39;s an example:</p>
<pre><code>// Exporting individual declarations using &#39;export&#39;
export const variable1 = 10;
export function foo() {
  // Function implementation
}
export class MyClass {
  // Class implementation
}</code></pre><p>To import the exported declarations individually:</p>
<pre><code>import { variable1, foo, MyClass } from &#39;./module&#39;;</code></pre><p>export default: The export default syntax allows you to export a single default value from a module. You can have only one default export per module. The default export is often used to export a single value, such as a class, function, or object literal, which is considered the main export of the module. Here&#39;s an example:</p>
<pre><code>// Exporting a default value using &#39;export default&#39;
export default function foo() {
  // Function implementation
}</code></pre><p>To import the default export:</p>
<pre><code>import foo from &#39;./module&#39;;
If you need to import both named exports and the default export from the same module, you can combine them in a single import statement:</code></pre><pre><code>import foo, { variable1, MyClass } from &#39;./module&#39;;</code></pre><p>In summary, export is used to export multiple named declarations, while export default is used to export a single default value from a module. The choice between them depends on your specific use case and the desired import syntax.</p>
]]></description>
        </item>
    </channel>
</rss>