본문 바로가기

IT59

[Spring] 스프링 핵심 원리 - 기본편 (2) 이전 글 [Spring] 스프링 핵심 원리 - 기본편 (1) 스프링의 핵심 원리 이해1 - 예제 만들기 1. 프로젝트 생성 https://start.spring.io/ 에서 설정 후 spring boot 프로젝트 생성한다. 만들어진 프로젝트를 압축해제 후 Intellij에서 Import하여 확인한다. src/main/java/{group}/{Artifact}/{Artifate}Application을 run하여 정상 작동 여부를 확인한다. Intellij gradle 세팅 변경 2. 비즈니스 요구사항과 설계 3. 회원 도메인 설계 4. 회원 도메인 개발 Grade, Member - model public enum Grade { BASIC, VIP } public class Member { private L.. 2023. 1. 24.
[LeetCode] 96. Unique Binary Search Trees Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Example 1: Input: n = 3 Output: 5 Example 2: Input: n = 1 Output: 1 Constraints: 1 int: if num == 0: return 1 else: return calcul(num - 1) * 2 * (2 * num + 1) // (num + 2) return calcul(n - 1) 문제 출처 : https://leetcode.com/problems/unique-binary-search-t.. 2023. 1. 15.
[Spring] 스프링 핵심 원리 - 기본편 (1) 객체 지향설계와 스프링 1. 이야기 - 자바 진영의 추운 겨울과 스프링의 탄생 기존 EJB(Enterprise Java Beans) 사용 but 비싼 비용, 복잡하고 어려움, 느림 Spring -> EJB 컨테이너 대체, 단순함 Hibernate -> EJB 엔티티빈 기술 대체, JPA(Java Persistence API) 표준 정의 2. 스프링이란? 필수 : 스프링 프레임워크, 스프링 부트 선택 : 스프링 데이터, 스프링 세션, 스프링 시큐리티, 스프링 REST Docs, 스프링 배치, 스프링 클라우드 핵심 : 객체 지향 언어인 자바 언어 기반의 프레임워크 스프링 프레임워크 핵심 기술 : 스프링 DI 컨테이너, AOP, 이벤트, 기타 웹 기술 : 스프링 MVC, 스프링 WebFlux 데이터 접근 기술.. 2023. 1. 9.
[Docker] Docker 명령어 docker ps 현재 가동중인 도커 컨테이너 목록을 조회한다. docker images 현재 이미지들을 조회한다. docker load -i xxxx.tar.gz xxxx.tar.gz 파일에서 이미지를 로드한다. docker rmi xxxxxx 이미지 아이디가 xxxxxx 인 이미지를 삭제한다. docker-compose | docker compose - 버전에 다라 다름 -f : 파일 -d : 가상화 --build : 빌드 docker-compose -f docker-compose.yaml down docker-compose.yaml 파일에 따라 올라가있는 컨테이너를 다 내린다. docker-compose -f docker-compose.yaml up -d docker-compose.yaml 파일에 .. 2022. 12. 8.
[LeetCode] 91. Decode Ways A message containing letters from A-Z can be encoded into numbers using the following mapping: 'A' -> "1" 'B' -> "2" ... 'Z' -> "26" To decode an encoded message, all the digits must be grouped then mapped back into letters using the reverse of the mapping above (there may be multiple ways). For example, "11106" can be mapped into: "AAJF" with the grouping (1 1 10 6) "KJF" with the grouping (11 .. 2022. 12. 8.
[LeetCode] 88. Merge Sorted Array You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be returned by the function, but instead be stored inside the array nums1. To accommodate this, nums1 has a lengt.. 2022. 11. 15.
[Python] String에 변수 사용(f-string) 기존 python에서는 string에 변수를 넣기 위해서는 C와 유사한 아래와 같은 형식이나, str = "Hello, World, My name is %s, I'm %d years old" % (name, age) format()을 사용하여 변수를 매핑하여 사용하였다. str = "Hello, World, My name is {}, I'm {} years old".format(name, age) Python 3.6부터 f-string을 지원하여 이를 사용 가능하다. str = f"Hello, World, My name is {name}, I'm {age} years old" 2022. 11. 13.
[Docker][Error] /bin/sh: start.sh: not found Docker 실행시 /bin/sh start.sh: not found 와 유사하게 start.sh 혹은 run.sh 등 실행 파일을 못 찾는 경우가 종종 발생한다. 그 원인을 찾기 위해 해당 파일을 보니 각 라인마다 '^M'의 개행 문자가 붙어 있는게 원인이었다. 윈도우에서 vscode를 사용하여 저장하다보니 윈도우의 개행인 CRLF로 저장되어 발생한 문제였다. 설정된 개행방식을 아래와 같이 Unix/Linux에서 사용되는 LF로 저장하니 오류가 해결되었다. CR : Carriage return / 커서를 앞으로 이동 LF : Line Feed / 아래로 이동 ※ vi, vim에서 ^M 처리 방법 :%s/^M//g 2022. 10. 27.
[LeetCode] 83. Remove Duplicates from Sorted List Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well. Example 1: Input: head = [1,1,2] Output: [1,2] Example 2: Input: head = [1,1,2,3,3] Output: [1,2,3] Constraints: The number of nodes in the list is in the range [0, 300]. -100 2022. 10. 27.
반응형