전체 글 (443) 썸네일형 리스트형 aws ec2) ssh pem key 접속시 permisson denied 운영체제 마다 다르겠지만 ubuntu 운영체제의 기본 아이디는 'ubuntu' 이므로아이디를 바꿔 접속해보니 되었다. ssh -i ./ssh2.pem ubuntu@56.112.314.11 Amazon 운영체제인 경우는'ec2-user'로 하면 된다 ssh -i ./ssh2.pem ec2-user@56.112.314.11 node-thermal-printer 물리 영수증 구현 적용기 키오스크 프로젝트를 진행하면서 물리 영수증을 구현하기로 했다.물리 영수증은 주방, 계산서, 영수증으로 나뉘고 세가지를 node thermal printer로 구현해보았다. 순서는 다음과 같다.1. Thermal Printer 셋팅2. Node.js로 구현3. 추가내용 1. Thermal Printer 셋팅 포트는 5개가 있는데파워, USB포트 두 가지를 사용한다. USB를 연결하면 컴퓨터에서 연결된 포트를 찾을 수 있다. 윈도우키 -> 설정 -> 기타 디바이스 COM3 포트에 연결됨을 확인할 수 있다. 2. Node.js로 구현const { SerialPort } = require('serialport');const iconv = require('iconv-lite');const port = new .. git - 토큰 비밀번호 저장 (github action을 위함) git config --global credential.helper store Springboot3 - 문자인증 구현(coolsms) 1. 발신번호 셋팅 본인 혹은 사업자 번호 인증받으면 된다. 2. API key 발급 3. 개발 https://github.com/coolsms/coolsms-java-examples GitHub - coolsms/coolsms-java-examples: CoolSMS Java/Kotlin SDK 예제 목록CoolSMS Java/Kotlin SDK 예제 목록. Contribute to coolsms/coolsms-java-examples development by creating an account on GitHub.github.com 4. 완성된 코드@RestController@RequestMapping("/message")public class MessageController { .. vscode 에서 java 버전 변경(java extension 설치 후 기본 버전(jdk21)으로 셋팅되는 경우) 1) java 기본 버전 경로 변경2) gradle 변경 1) java 기본 버전 경로 변경 Settings > "Edit in Settings.json" 들어가기 원하는 버전에 아래 옵션값 추가default:true path는 직접 설치한 경로를 지정해주면 됨 추가로터미널에서 확인할 때안 바뀌어 있으면 여기 바꾸면 됨 2) gradle 변경 gradle은 자바로 패키지를 가져오기 때문에자바 버전과 맞춰줘야함 바로 적용해도되고setting.json에서 적용해도 됨 git - 유용한 기능(로컬 커밋내역, 특정 브랜치만 커밋내역, 브랜치 차이점 확인, 대화형모드) git의 몇가지 유용한 기능을 살펴본다 1. 로컬 커밋내역 2. 특정 브랜치만 선택하여 커밋내역확인하기3. 브랜치끼리 차이점 확인4. 대화형 모드 1. 로컬 커밋내역 로컬 커밋 내역 보기)git reflog 로컬 커밋 내역 포맷팅해서 보기)git log -g 2. 특정 브랜치만 선택하여 커밋내역 확인하기 Head의 부모 확인)git show HEAD^ 어제 커밋 확인)git show master@{yesterday} 특정 브랜치 커밋확인)git show branch-test 3. 브랜치끼리 차이점 확인 master에는 없지만 branch1에는 있는 것을 확인하기)git log master..branch1 branch1을 master에 머지하기 전 변경점 확인하기)git log origin/master.. Springboot3 - Exception 생성하기 Exception을 Custom 하여 명확한 에러를 처리해보자 1. 원하는 Exception class 생성하여 'RuntimeException'을 상속하면 됨 public class NotEnoughStockException extends RuntimeException { public NotEnoughStockException() { } public NotEnoughStockException(String message) { super(message); } public NotEnoughStockException(String message, Throwable cause) { super(message, cause); } public NotEnoughStockException(Throwable cause) {.. Springboot3 - 테스트환경 메모리 모드로 설정 Spring Boot 프로젝트 생성시 com.h2database:h2 를 가져오는데해당 패키지로 db를 메모리 모드로 변환 시킬 수 있다. 먼저 테스트 환경에서 사용할 환경변수를 분리하자 1. 테스트 케이스시에 사용할 환경 분리 프로젝트 디렉토리는 다음과 같다.src-> main -> test test 디렉토리 하위에resources를 생성해 yml을 다음과 같이 넣어주자 spring: datasource: url: jdbc:h2:mem:test; username: sa password: driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: create properties: hibern.. 이전 1 ··· 10 11 12 13 14 15 16 ··· 56 다음