profile
Alex's Develog πŸ€”
νƒœκ·Έ λͺ©λ‘
전체보기 (91)Spring(29)Java(18)JPA(16)Hibernate(16)Database(14)Spring boot(14)mysql(11)JUnit5(9)Mockito(9)msa(8)spring cloud(8)algorithm(7)python(7)baekjoon(7)boj(7)coding test(7)design patterns(6)BFS(5)Graph(5)Microservices(5)eureka(4)DFS(4)REST(3)blockchain(3)spring-data-jpa(3)String(2)chatting(2)OOP(2)JPQL(2)creational design patterns(2)JWT(2)native query(2)websocket(2)entity manager(2)unit test(2)git(2)persistence context(2)docker(2)transaction(2)creational(2)like(2)eager fetch(2)mock(2)merge(1)http(1)λ³΅ν˜Έν™”(1)query method(1)Thread(1)phantom read(1)interface segregation principle(1)mockMvc(1)λŒ€μΉ­ν‚€(1)lazy fetch(1)μ–‘λ°©ν–₯(1)security(1)ifnull(1)datatype(1)feign(1)many to many(1)sleuth(1)service discovery(1)dijkstra(1)verify(1)isolation level(1)bidirectional(1)MVC(1)first level cache(1)rebase merge(1)many to one(1)csrf(1)StringBuilder(1)entity graph(1)one to many(1)message broker(1)single table(1)H2(1)연관관계(1)argument matchers(1)annotation(1)spy(1)SOLID(1)network(1)&&(1)@MockBean(1)Rollback(1)ALTER(1)DROP(1)CREATE(1)config server(1)inheritance(1)basic authentication(1)DBMS(1)https(1)REST API(1)json(1)simple factory(1)hash function(1)decrypt(1)ν•™μ—…κ³„νš(1)one to one(1)hystrix(1)@modifying(1)p2p network(1)aop(1)delete(1)joined(1)data type(1)Load balancing(1)select(1)squash merge(1)2020(1)RestTemplate(1)rdb(1)StringBuffer(1)nullif(1)synchronous(1)permissioned(1)join fetch(1)persistence(1)LIS(1)update(1)cloud config server(1)JVM(1)API Gateway(1)single responsibility principle(1)zipkin(1)데이터 νƒ€μž…(1)streaming system(1)encrypt(1)consensus(1)kafka(1)μ•”ν˜Έν™”(1)n + 1(1)messaging(1)aws(1)Dependency Inversion Principle(1)spring security(1)spring cloud bus(1)λ³€μˆ˜(1)Builder(1)Token(1)regexp(1)zuul(1)ehcache(1)단방ν–₯(1)if(1)ACID(1)open closed principle(1)@SpringBootTest(1)entity relationships(1)equals(1)Singleton(1)rabbitmq(1)Factory Method(1)private(1)case(1)permissionless(1)unidirectional(1)named query(1)second level cache(1)non-repeatable read(1)structural(1)liskov substitution principle(1)Relational Database(1)fp(1)stomp(1)asynchronous(1)λΉ„λŒ€μΉ­ν‚€(1)microservice(1)variable(1)table per class(1)transactional(1)sql(1)relationships(1)integration test(1)ec2 instance(1)behavioral(1)mapped super class(1)ORM(1)public(1)dirty read(1)INSERT(1)Restful(1)
post-thumbnail

[Kafka] Introducing Apache Kafka

Producers and Consumers subscribe to a stream of recordsProducer -> Streaming Platform -> ConsumerThe producer and consumer here are independent of ea

2020λ…„ 9μ›” 26일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Design Patterns] Creational Design Patterns - Singleton

πŸš€ Singleton A singleton class has only one instance, accessible globally through a single point(via a method/field) The main problem this pattern so

2020λ…„ 9μ›” 20일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Design Patterns] Creational Design Patterns - Factory Method

We want to move the object creation logic from our code to a separate class.We use this pattern when we do not know in advance which class we may need

2020λ…„ 9μ›” 19일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Design Patterns] Creational Design Patterns - Simple Factory

Simpley move the instantiation logic to a separate class and most commonly to a static method of this class.Some do not consider simple factory to be

2020λ…„ 9μ›” 18일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Design Patterns] Creational Design Patterns - Builder

We have a complex process to construct an object involving multiple steps, then builder design pattern can help us.In Builder we remove the logic rela

2020λ…„ 9μ›” 16일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Design Patterns] Creational, Structural, and Behavioral Patterns

Creational Patterns deal with process of creation of objects of classes.Structural Patterns deal with how classes and objects are arranged or composed

2020λ…„ 9μ›” 15일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Design Patterns] SOLID Principles

Definition: There should never be more than one reason for a class to changefocuses on a single functionalityaddresses a specific concernExampleProtoc

2020λ…„ 9μ›” 13일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JPA & Hibernate] JPA Hidden Traps

1️⃣ @Transactional λ‚­λΉ„ μ•„λž˜μ˜ λ©”μ†Œλ“œλ₯Ό λ³΄μ‹œλ©΄ λͺ¨λ“  것이 μ œλŒ€λ‘œ 흘러 κ°€λŠ” 것을 λ³Ό μˆ˜κ°€ μžˆμŠ΅λ‹ˆλ‹€. λ°μ΄ν„°λ² μ΄μŠ€λ‘œλΆ€ν„° μ—”ν‹°ν‹°κ°€ λ°˜ν™˜λœλ‹€. λ°˜ν™˜λœ μ—”ν‹°ν‹°μ˜ ν•„λ“œλ₯Ό λ³€κ²½ν•œλ‹€. 쑰건이 λ§žλ‹€λ©΄ λ³€κ²½ 사항을 λ°μ΄ν„°λ² μ΄μŠ€λ‘œ μ—…λ°μ΄νŠΈ ν•œλ‹€. ν•˜μ§€λ§Œ μ–΄λ…Έν…Œμ΄μ…˜μ„

2020λ…„ 9μ›” 10일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Chatting Server] Stomp둜 μ±„νŒ… κΈ°λŠ₯ ν™•μž₯

πŸš€ WebSocketκ³Ό Stompλ₯Ό 톡해 μ±„νŒ… μ„œλ²„ κ΅¬ν˜„ λ©”μ‹œμ§• 방식을 잘 μ •μ˜ν•œλ‹€λ©΄ WebSocket λ§ŒμœΌλ‘œλ„ μΆ©λΆ„νžˆ 쒋은 Server/Client μ†ŒμΌ“ μ„œλ²„λ₯Ό μ™„μ„±ν•  수 μžˆμŠ΅λ‹ˆλ‹€. ν•˜μ§€λ§Œ λ‹¨μˆœν•œ 톡신 ꡬ쑰둜 인해 WebSocketλ§Œμ„ μ΄μš©ν•΄ μ±„νŒ…μ„ κ΅¬ν˜„ν•˜λ©΄ ν•΄λ‹Ή

2020λ…„ 9μ›” 9일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[Chatting Server] Basic WebSocket Server

일반적인 HTTP 톡신을 ν•˜λŠ” μ„œλ²„λ“€κ³Ό 달리 μ±„νŒ… μ„œλ²„λŠ” Socket 톡신을 ν•˜λŠ” μ„œλ²„κ°€ ν•„μš”ν•©λ‹ˆλ‹€. ν†΅μƒμ μœΌλ‘œ HTTP 톡신은 Client 의 μš”μ²­μ΄ μžˆμ„ λ•Œλ§Œ μ„œλ²„κ°€ μ‘λ‹΅ν•˜κ³  연결을 μ’…λ£Œν•˜λŠ” 단방ν–₯ 톡신 μž…λ‹ˆλ‹€. λ”°λΌμ„œ Client κ°€ Server 에 접속해 데이터

2020λ…„ 9μ›” 8일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Creating different Test Configuration

ν…ŒμŠ€νŠΈλ₯Ό μ§„ν–‰ν•˜κ²Œ 되면 ν…ŒμŠ€νŠΈ ν™˜κ²½μ— λ§žμΆ°μ„œ ν™˜κ²½ 섀정을 해쀄 ν•„μš”κ°€ μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€. 이럴 λ•Œμ—λŠ” src/test 디렉터리에 μƒˆλ‘œμš΄ resources λΌλŠ” 디렉터리λ₯Ό μƒμ„±ν•΄μ€λ‹ˆλ‹€. 그리고 ν•΄λ‹Ή 디렉터리에 application.yml νŒŒμΌμ„ μƒμ„±ν•΄μ„œ 기쑴의 섀정듀을

2020λ…„ 9μ›” 5일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Integration Test using @SpringBootTest

@SpringBootTestν•΄λ‹Ή 클래슀의 νŒ¨ν‚€μ§€λ₯Ό νƒμƒ‰ν•΄μ„œ @SpringBootApplication μ–΄λ…Έν…Œμ΄μ…˜μ΄ μžˆλŠ” 클래슀λ₯Ό νƒμƒ‰ν•˜κ³  μ‹€ν–‰μ‹œν‚΅λ‹ˆλ‹€. λ§Œμ•½ μ—†λ‹€λ©΄ ν•œ νŒ¨ν‚€μ§€μ”© μ€„μ—¬κ°€λ©΄μ„œ 탐색을 μ΄μ–΄λ‚˜κ°‘λ‹ˆλ‹€. ν•΄λ‹Ή μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ μ‹€ν–‰μ‹œμΌœ μ£Όλ―€λ‘œ λͺ¨λ“  μ»΄ν¬λ„ŒνŠΈ(Bean)λ“€

2020λ…„ 9μ›” 5일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[BlockChain] λŒ€μΉ­ν‚€ μ•”ν˜Έ & λΉ„λŒ€μΉ­ν‚€ μ•”ν˜Έ

μ•”ν˜Έν™”λŠ” 평문을 μ•”ν˜Έλ‘œ λ§Œλ“œλŠ” κ²ƒμž…λ‹ˆλ‹€.(cipher, encrypt)λ³΅ν˜Έν™”λŠ” μ•”ν˜Έλ₯Ό ν‰λ¬ΈμœΌλ‘œ λ§Œλ“œλŠ” κ²ƒμž…λ‹ˆλ‹€.(decipher, decrypt)μ•”ν˜Έν™”μ— μ‚¬μš©ν•œ 킀와 λ³΅ν˜Έν™”μ— μ‚¬μš©ν•œ ν‚€κ°€ λ™μΌν•œ 경우 λŒ€μΉ­ν‚€ μ•”ν˜Έλ‘œ λΆ„λ₯˜λ©λ‹ˆλ‹€.λ°˜λŒ€λ‘œ λ‹€λ₯Ό κ²½μš°μ—λŠ” λΉ„λŒ€μΉ­ν‚€ μ•”ν˜Έλ‘œ λΆ„λ₯˜λ©

2020λ…„ 9μ›” 2일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[BlockChain] Public, Private, Permissionless, Permissioned

퍼블릭과 ν”„λΌμ΄λΉ—μ˜ ꡬ뢄은 블둝체인에 λ‹€μŒμ„ μˆ˜ν–‰ν•  수 μžˆλŠ”μ§€ ν™•μΈν•˜μ—¬ κ²°μ •:λˆ„κ΅¬λ“ μ§€ 기둝된 정보(블둝)λ₯Ό 자유둭게 읽을 수 μžˆλŠ”μ§€?λͺ…μ‹œμ μΈ 등둝 λ˜λŠ” μžκ²©μ·¨λ“ 없이 정보λ₯Ό 블둝체인 λ„€νŠΈμ›Œν¬μ— 기둝할 수 μžˆλŠ”μ§€?λΈ”λ‘μ²΄μΈμ˜ 정보가 κ³΅κ°œλ˜μ–΄ 있고, λ„€νŠΈμ›Œν¬κ°€ μ •ν•œ κΈ°μ€€(e

2020λ…„ 9μ›” 2일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[BlockChain] 블둝체인 κΈ°λ³Έ κ°œλ…

정보λ₯Ό 블둝이라고 ν•˜λŠ” λ‹¨μœ„λ‘œ μ €μž₯ν•˜μ—¬ μ €μž₯된 블둝듀을 μ²΄μΈν˜•νƒœλ‘œ 묢은 μ €μž₯ κΈ°μˆ μž…λ‹ˆλ‹€.μž„μ˜μ˜ 길이의 데이터λ₯Ό κ³ μ •λœ 길이의 λ°μ΄ν„°λ‘œ λ§€ν•‘ν•˜λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€.ν•΄μ‹œ, ν•΄μ‹œ κ°’, ν•΄μ‹œ μ½”λ“œ = ν•΄μ‹œ ν•¨μˆ˜μ— μ˜ν•΄ μ–»μ–΄μ§€λŠ” 값데이터λ₯Ό X, ν•΄μ‹œν•¨μˆ˜λ₯Ό H라고 ν‘œκΈ°ν•  λ•Œ ν•΄μ‹œλ₯Ό H(

2020λ…„ 9μ›” 2일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Controller Unit Tests with Service using @MockBean

λ§Œμ•½ ν…ŒμŠ€νŠΈν•  μ»¨νŠΈλ‘€λŸ¬κ°€ μ˜μ‘΄μ„±μ΄ μžˆλŠ” μ„œλΉ„μŠ€ 빈이 μžˆλ‹€λ©΄ μŠ€ν”„λ§ λΆ€νŠΈμ—μ„œ μ œκ³΅ν•΄μ£ΌλŠ” @MockBean μ–΄λ…Έν…Œμ΄μ…˜μ„ ν†΅ν•΄μ„œ ν•΄λ‹Ή λΉˆμ„ μ£Όμž…μ‹œν‚€κ³  Mock Object둜 μƒμ„±ν•΄μ€λ‹ˆλ‹€. κ·Έλ‹€μŒμ— λ˜‘κ°™μ΄ ν•΄λ‹Ή Mock Object κ°€ κ°€μ§ˆ 행동(Behavior)을 μ§€μ •ν•΄μ£Όλ©΄

2020λ…„ 8μ›” 28일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Using @MockMvc to test Controllers

μœ λ‹› ν…ŒμŠ€νŠΈλ₯Ό ν•  λ•Œ 컨트둀러 λ‹¨λ§Œ ν…ŒμŠ€νŠΈ ν•΄μ•Όν•˜λŠ” κ²½μš°κ°€ μžˆμŠ΅λ‹ˆλ‹€. 이럴 λ•Œμ—λŠ” μŠ€ν”„λ§ λΆ€νŠΈμ—μ„œ μ œκ³΅ν•΄μ£ΌλŠ” @WebMvcTest() 와 MockMvc λ₯Ό μ‚¬μš©ν•˜λ©΄ λ©λ‹ˆλ‹€.@WebMvcTest(\[ControllerName.class])이 μ–΄λ…Έν…Œμ΄μ…˜μ„ 클래슀 상단뢀에

2020λ…„ 8μ›” 28일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Spying

Mock Object λ₯Ό 생성할 λ•Œ, μƒμ„±ν•œ κ°μ²΄λŠ” μ§€μ •ν•œ 클래슀의 행동(Behavior)λ₯Ό κ°€μ§€μ§€ λͺ»ν•©λ‹ˆλ‹€. 즉, κ°œλ°œμžκ°€ 직접 ν•΄λ‹Ή 객체의 행동을 μ§€μ •ν•˜μ§€ μ•ŠλŠ” 이상(when(), thenReturn()) ν•΄λ‹Ή 객체가 μˆ˜ν–‰ν•˜λŠ” λͺ¨λ“  행동은 λ””ν΄νŠΈ κ°’μœΌλ‘œ μˆ˜ν–‰ν•˜κ²Œ 됩

2020λ…„ 8μ›” 28일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Verify Method Calls

쑰금 더 κ²¬κ³ ν•˜κ³  μ •ν™•ν•œ ν…ŒμŠ€νŠΈλ₯Ό μ§„ν–‰ν•˜κΈ° μœ„ν•΄μ„œ 가끔은 ν•΄λ‹Ή ν…ŒμŠ€νŠΈ μ•ˆμ—μ„œ νŠΉμ • λ©”μ†Œλ“œλ₯Ό ν˜ΈμΆœν–ˆλŠ”μ§€μ— λŒ€ν•΄μ„œ 검증을 ν•  ν•„μš”κ°€ μžˆμŠ΅λ‹ˆλ‹€. 이λ₯Ό μœ„ν•΄ Mockito μ—μ„œλŠ” verify() λΌλŠ” ν•¨μˆ˜λ₯Ό μ§€μ›ν•΄μ€λ‹ˆλ‹€.verify(mock).method(param);ν•΄λ‹Ή M

2020λ…„ 8μ›” 28일
Β·
0개의 λŒ“κΈ€
Β·
post-thumbnail

[JUnit & Mockito] Return Multiple Values & Argument Matchers

πŸš€ Return Multiple Values λ‹€μŒμœΌλ‘œλŠ” ν•΄λ‹Ή Mock Object에 νŒŒλΌλ―Έν„°μ™€ ν•¨κ»˜ λ©”μ†Œλ“œλ₯Ό μ‚¬μš©ν•  λ•Œμ—λŠ” λ‹€μŒκ³Ό 같이 μž‘μ„±ν•˜μ‹œλ©΄ λ˜λŠ”λ°, λ§Œμ•½ 정해놓은 νŒŒλΌλ―Έν„°λ₯Ό μ‚¬μš©ν•˜μ§€ μ•Šκ³  Mock Objectλ₯Ό μ‚¬μš©ν•˜κ²Œ 되면 μ „λ‹¬ν•œ 값에 ν•΄λ‹Ήν•˜λŠ” λ””ν΄νŠΈκ°’μ΄ 반

2020λ…„ 8μ›” 28일
Β·
0개의 λŒ“κΈ€
Β·