본문 바로가기

공부이야기27

[Spring] Bean? DI? 이제는 친해지자! "Spring"이라 했을 때 많이 나오는 키워드 중 하나는 바로 DI, 즉 의존성 주입이다. 도대체 이게 왜 Spring의 키워드일까? 그 이유는 바로 Spring이 이 DI 과정을 알아서 해 주기 때문이다. 최근에 Spring 공부를 다시 시작하게 되었는데 아주 간단하게 DI에 대해 알아보자! 먼저, DI란 뭘까? DI (Dependency Injection): 의존성 주입 고객 관리 서비스를 개발할 때 고객을 관리하는 Service Class가 있으면 고객의 데이터를 다루는 Dao Class가 있을 것이다. 이 경우 아래와 같이 두 Class간의 의존성이 생기게 된다. class MemberService { private MemberDao memberDao = new MemberDao(); } Mem.. 2022. 9. 24.
[LeetCode][Stack] 20. Vali Parentheses 문제 링크 https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brac.. 2022. 9. 3.
[LeetCode][DFS|BFS] 130. Surrounded Regions 문제 링크 https://leetcode.com/problems/surrounded-regions/ Surrounded Regions - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given an m x n matrix board containing 'X' and 'O', capture all regions that are 4-directionally surrounded by 'X'. A region is captured by flipping all 'O's.. 2022. 4. 7.
[LeetCode][DFS|BFS] 1654. Minimum Jumps to Reach Home 문제 링크 https://leetcode.com/problems/minimum-jumps-to-reach-home/ Minimum Jumps to Reach Home - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com A certain bug's home is on the x-axis at position x. Help them get there from position 0. The bug jumps according to the following rules: I.. 2021. 11. 21.