전체 글

기록합시다.
카테고리 없음

[ERROR] Can't start redis server. Check logs for details. / Mac M1 Embedded Redis 설정

M1 mac + SpringBoot + Embedded Redis + redisServer.start(); 시 에러 발생 에러 발생 코드 package com.express.freight.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.co..

ERROR

[ERROR] No tests found for given includes: [com.express.freight.common.UserRedisRepositoryTest.test]

그 외 에러 @ID 문제 @Id 어노테이션을 org.springframework.data.annotation.Id 로 임포트 해야 한다 그렇지 않을 경우, Error creating bean with name '?? repository' defined in ?? repository defined in @EnableRedisRepositories declared on RedisRepositoriesRegistrar.EnableRedisRepositoriesConfiguration: Invocation of init method failed; Bean 등록이 안될 수 있다. ( 프로젝트 실행이 안된다! ) 무슨 에러? Spring Boot Test시 test를 찾지 못해서 발생하는 에러. 언제 발생? Jun..

ALGORITHM

[SQL 연습] 프로그래머스 즐겨찾기가 가장 많은 식당 정보 출력하기

출처 : 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 쿼리 (ORACLE) : SELECT FOOD_TYPE, REST_ID, REST_NAME, FAVORITES FROM REST_INFO WHERE (FOOD_TYPE, FAVORITES) IN ( SELECT FOOD_TYPE, MAX(FAVORITES) as FAVORITES FROM REST_INFO GROUP BY FOOD_TYPE ) ORDER BY FOOD_TYPE DESC;

ALGORITHM

[SQL 연습] 프로그래머스 조건에 부합하는 중고거래 댓글 조회하기

출처 : https://school.programmers.co.kr/learn/courses/30/lessons/164673 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 쿼리 (ORACLE) : SELECT ugb.title, ugb.board_id, rply.reply_id, rply.writer_id, rply.contents, TO_CHAR(rply.created_date, 'YYYY-MM-DD') AS created_date FROM USED_GOODS_BOARD ugb LEFT JOIN USED_GOODS_REPLY rply on ugb.boa..

SERVER

[SERVER] Zombie process

System information as of Tue Dec 12 13:23:50 KST 2023 System load: 0.0 Processes: 181 Usage of /: 75.2% of 48.27GB Users logged in: 0 => There are 4 zombie processes. * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s just raised the bar for easy, resilient and secure K8s cluster deployment. https://ubuntu.com/engage/secure-kubernetes-at-the-edge Expanded Security Maint..

DB

[DB] postgresql recursive 재귀쿼리

1. 부서의 cd를 상위 부서 (upper_dept)로 가지는 모든 하위 부서 찾기. -- 계층형 db 탐색을 위한 재귀쿼리 WITH RECURSIVE find_dept(dept_cd, dept_name, upper_dept, dept_depth ) AS ( --1 select SELECT dept_cd, dept_name, upper_dept, dept_depth FROM dept WHERE 1=1 AND dept_cd = '첫번째_DEPT' UNION --2 repeat SELECT dept_cd, dept_name, upper_dept, dept_depth FROM find_dept fnd_dpt INNER JOIN dept d ON fnd_dpt.upper_dept = d.dept_cd AND d..

DB

[DB] postgresql TEXT vs VARCHAR vs JSON 타입은 언제 써야하나?

1. 이 TEXT data type은 왜 필요한가? 🤖 일반적인 데이타 타입은 보통 varchar 로 생성해왔었다. 하지만, 오늘은 LOB (BLOB / CLOB 같은 대용량 데이터를 저장하는 컬럼 타입 ) Large Object 가 필요한 상황이다. 많은 데이터를 기록 할 데이터타입을 선택해야하는 상황이라는 것. 사용자의 필기 정보를 JSON 데이터로 저장하고 불러오는 작업을 해야하는데, 필기가 어느정도로 많아질 지 모르기 때문이다 . 필기 정보를 데이터로 저장하는 작업의 JSON 길이가 너무 길기도 길다. 하지만 이런 커다란 데이터 타입을 밀어넣으면 DB 서버가 힘들어 할 지 몰라서 왜? 언제? 써도 되는지? 에 대해 정리한다. 참고로 varchar 나 text 타입이나 모두 65,535 charac..

MOBILE

[flutter] BlocSelector

사이드로 시작한 프로젝트에서 사용한 blocSelector 를 정리한다. 일반적으로 블록 패턴을 사용할때에는 BlocBuilder / BlocListener / BlocSelector 등을 많이 사용하는 것 같다. 그중 특정 State의 특정 값을 감지해서 위젯을 리빌드하는 블록 셀렉터를 기록한다. 전체 코드는 다음에서 확인 가능하다. https://github.com/jaemanc/freight_front GitHub - jaemanc/freight_front Contribute to jaemanc/freight_front development by creating an account on GitHub. github.com BlocListener는 인자로 Bloc과 State를 받는다. BlocList..

SERVER

[Cloud Front] 클라우드 프론트 무효화

클라우드 프론트? https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/Introduction.html Amazon CloudFront란 무엇입니까? - Amazon CloudFront Amazon CloudFront란 무엇입니까? Amazon CloudFront는 .html, .css, .js 및 이미지 파일과 같은 정적 및 동적 웹 콘텐츠를 사용자에게 더 빨리 배포하도록 지원하는 웹 서비스입니다. CloudFront는 엣지 로케이션 docs.aws.amazon.com 아마자 / 파일 / 배포 서버도 포함된다. 회사에서 안드로이드 태블릿에서 모듈을 불러올때, 수정사항이 반영되지 않는 것을 보고 클라우드 프론트를 의심했다. 인수..

DB

[DB] MySQL CURRENT_TIMESTAMP

CURRENT_TIMESTAMP 설정 default expression 에 current_timestamp 를 설정하거나. now() 를 설정한다. 이렇게하면 데이터가 생성되는 시점에 찍히므로 서버단에서 지정 할 필요가 없어 간편하다는 장점이 있다. QUERY : alter table tb_spend alter column created_at set default CURRENT_TIMESTAMP; JPA 사용일경우 JPA 를쓴다면, @CreationTimeStamp - 하이버네이트 @CreatedDate - 스프링 둘다 크게 기능상 차이는 없다. 현재 사이드 프로젝트에서는 이런 방식으로 사용하고 있다. @CreatedDate @Column(name="created_at") @JsonFormat(patte..