본문 바로가기

분류 전체보기

(121)
Gradle Build Skip Test (테스트 없이 빌드) Gradle Project에서 빌드할 때 테스트를 하지 않고 싶은 경우가 있어요. 5 버전 기준이에요. gradle build --exclude-task test 또는 build.gradle 에 아래와 같은 패턴으로 test 시에 패키지들을 제외시킬 수도 있어요. test { exclude '**/*' } test { exclude 'com/example/demo**' }
[MacOS] zsh compinit: insecure directories, run compaudit for list. MacOS 터미널에서 다음과 같은 경고가 뜨는 경우가 있어요. 참고로 글 작성일자 기준 OS 버전은 Catalina 10.15.3입니다. zsh compinit: insecure directories, run compaudit for list. 해결을 위해선 우선 다음 명령어를 입력해주세요. compinit compaudit | xargs chmod g-w 이젠 안뜰거에요. 저게 먼지 궁금하신 분은 요기를 참고해주세요. 저도 이거 보고 했어요. https://www.wezm.net/technical/2008/09/zsh-cygwin-and-insecure-directories zsh, Cygwin and Insecure Directories - WezM.net by Wesley Moore Publishe..
Git 신규 브랜치 체크아웃 (did not match any file(s) known to git) error: pathspec 'new-branch' did not match any file(s) known to git 원격 레파지토리에 브랜치를 추가하고 checkout 받으려고하면 발생하는 에러에요. git remote update git fetch 그리고 하던대로 체크아웃 받으면 되요. git checkout new-branch
Docker Nexus 설치, 접속 Docker로 Nexus를 설치해보겠습니다. 1. Nexus 이미지 가져오기 docker pull sonatype/nexus 2. 신규 Container 생성, 실행 docker run -d -p 8081:8081 --name nexus-container sonatype/nexus3 끝이에요. Docker 컨테이너 자동으로 재시작하고 싶다면 아래와 같이 실행하면 되요. docker run -d -p 8081:8081 --name nexus-container -dit --restart unless-stopped sonatype/nexus3 3. 컨테이너에 터미널 접속 docker exec -it nexus-container /bin/bash 4. 시작/중지/재시작 docker start nexus-cont..
AWS IAM MFA 활성 (루트 계정 OTP) 해킹당하보신 적 한 번씩은 있으시죠 다들 AWS도 예외는 아닙니다. 실제로 아마존 계정을 해킹당하여 피해를 보는 사례들도 많습니다. MFA 활성을 통하여 간단한 계정 보안을 해볼게요. 우선, 스마트폰에 Google Authenticator 앱을 설치해주세요. 안드로이드 https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=ko Google OTP - Google Play 앱 Google OTP는 휴대전화에서 2단계 인증 코드를 생성합니다. 2단계 인증은 로그인 시 2단계 인증을 요구하여 Google 계정을 더욱 안전하게 보호합니다. 비밀번호뿐만 아니라 휴대전화의 Google OTP 앱에서 생성된 코드도..
Spring Boot Banner.txt (프로젝트 타이틀 콘솔 출력) Spring Boot 프로젝트를 생성하고 실행하면 아래 사진과 같은 배너를 확인할 수 있어요. 이 배너를 바꿔보려고 해요. src/main/resources 경로에 banner.txt 파일을 생성해주고 내용을 입력해주세요. banner.txt 아래 내용을 그대로 복사하여 banner.txt에 붙여넣어보세요. ,--. ,--. ,--. ,--. ,--. ,--. ,--. ,--. | '--' | ,---. | | | | ,---. | | | | ,---. ,--.--. | | ,-| | | .--. | | .-. : | | | | | .-. | | |.'.| | | .-. | | .--' | | ' .-. | | | | | \ --. | | | | ' '-' ' | ,'. | ' '-' ' | | | | ..
No identifier specified for entity (JPA) 스프링 부트(Spring Boot) 애플리케이션을 실행했는데 오류가 났어요. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.exa..
자바 썸네일 이미지 생성 (Thumbnail Image) 자바로 썸네일(thumbnail) 이미지를 만들어볼거에요. 원본 비율 유지 String oPath = "C:/Temp/40f0594a-b3f6-4c0f-a0b2-3cebbaf0d74e.jpg"; // 원본 경로 File oFile = new File(oPath); int index = oPath.lastIndexOf("."); String ext = oPath.substring(index + 1); // 파일 확장자 String tPath = oFile.getParent() + File.separator + "t-" + oFile.getName(); // 썸네일저장 경로 File tFile = new File(tPath); double ratio = 2; // 이미지 축소 비율 try { Buffered..