This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { calc, search } from '@/pages/goodsList/search'; | |
describe('search api', () => { | |
it('search api를 호출한다.', async () => { | |
const { data } = await search({ keyword: 'blackpink' }); | |
// console.log(data); | |
expect(data).toMatchSnapshot(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
class CorsConfiguration { | |
@Bean | |
WebMvcConfigurer corsConfigurer() { | |
return new WebMvcConfigurer() { | |
@Override | |
public void addCorsMappings(final CorsRegistry registry) { | |
registry.addMapping("/**") | |
.allowedHeaders("*") | |
.allowedMethods("*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void queryDslQueryTest() { | |
JPAQuery<StatusCommonTemplateExcelData> query = | |
jpaQueryFactory.select( | |
Projections.constructor( | |
StatusCommonTemplateExcelData.class, | |
Expressions.stringTemplate("'집품'"), | |
qWarehouse.name, // "창고" | |
qPacking.status, // "포장 상태" | |
qShipping.deliverySeq, // "배송 ID" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mapstruct | |
annotationProcessor "org.mapstruct:mapstruct-processor:$mapstructVersion" | |
implementation "org.mapstruct:mapstruct:$mapstructVersion" | |
[For Java Developers: Forget BeanUtils and Trade for Performance and Code Simplicity by MapStruct | by Malvin Lok | Feb, 2024 | Medium](https://medium.com/@malvin.lok/for-java-developers-forget-beanutils-and-trade-for-performance-and-code-simplicity-by-mapstruct-b8934c830094) | |
@Data | |
@Builder | |
@AllArgsConstructor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loading load runner | |
@Bean | |
public ApplicationRunner runner(BalanceRepository balanceRepository) { | |
return args -> { | |
// ... | |
}; | |
} | |
@Component | |
public class DataLoader implements CommandLineRunner { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pom.xml | |
<!-- Encryption Library --> | |
<dependency> | |
<groupId>com.github.ulisesbocchio</groupId> | |
<artifactId>jasypt-spring-boot-starter</artifactId> | |
<version>3.0.2</version> | |
</dependency> | |
<dependency> | |
<groupId>org.bouncycastle</groupId> | |
<artifactId>bcprov-jdk15on</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.Rule; | |
import org.junit.Test; | |
import org.springframework.boot.test.rule.OutputCapture; | |
import static org.hamcrest.Matchers.containsString; | |
public class OutputCaptureTest { | |
@Rule | |
public OutputCapture output = new OutputCapture(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.github.tomakehurst.wiremock.WireMockServer; | |
import com.kakaobank.codingtest.infrastructure.rest.feign.kakao.KakaoOpenApiClient; | |
import com.kakaobank.codingtest.infrastructure.rest.feign.kakao.KakaoOpenApiRequestInterceptor; | |
import com.kakaobank.codingtest.infrastructure.rest.feign.kakao.KakaoPlaceResultDTO; | |
import com.kakaobank.codingtest.infrastructure.rest.feign.kakao.KakaoPlaceResultDTO.DocumentDTO; | |
import feign.Contract; | |
import feign.Feign; | |
import feign.codec.Decoder; | |
import feign.codec.Encoder; | |
import feign.httpclient.ApacheHttpClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package vine.mb.api.member.v1; | |
import io.restassured.specification.RequestSpecification; | |
import lombok.extern.slf4j.Slf4j; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.test.context.SpringBootTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pattern = Pattern.compile("\\p{IsHangul}"); | |
var result = Stream.of("ㄱ-ㅎ", "ㅏ-ㅢ", "한글") | |
.allMatch(hangul -> pattern.matcher(hangul).find()); | |
assertTrue(result); |
NewerOlder