전체 글

전체 글

    [CSS] input focus 효과 제거

    기본적으로 input, textarea등에 focus효과가 적용되어있는 경우가 있다. outline, box-shadow를 none처리해주면 해결~ input, input:focus, textarea, textarea:focus { outline: none !important; box-shadow: none !important; }

    [Git] tag 설정하기

    버전 명시를 할 때 git tag를 많이 사용하게 되는 듯 하다. 명령어 tag 업로드 태그를 원격저장소에 업로드한다면 꼭 push를 해주어야한다~ $ git tag v1.0.0 # 태그 설정 $ git push origin v1.0.0 # 원격저장소에 업로드 tag 삭제 원격저장소에 업로드하지 않은 태그는 -d 옵션을 붙여주면 되고 원격저장소에 올라간 태그는 :를 붙여주면 된다. $ git tag -d v1.0.0 # 로컬 태그 삭제 $ git push origin :v1.0.0 # 원격저장소의 태그 삭제

    [SpringBoot][Kotlin] org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing 에러

    [SpringBoot][Kotlin] org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing 에러

    실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발 강의를 들으면 주문서비스 테스트를 작성하고, 실행했는데 에러를 만났다. 반가워~👋 에러메세지 org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : com.jpabook.jpashop.domain.Order.delivery -> com.jpabook.jpashop.domain.Delivery; nested exception is java.la..

    [JUnit5][SpringBoot][Kotlin] Exception테스트하기 (assertThrows)

    [JUnit5][SpringBoot][Kotlin] Exception테스트하기 (assertThrows)

    JUnit4 Junit4에서 exception 테스트는 @Test(expected=기대하는예외)를 통해 가능하다. (JUnit5와 비교하기 위한 예시코드이므로 정확하진 않을 수 있음) @Test(expected = NotEnoughStockException::class) fun 상품주문_재고수량초과() { val member = createMember("사용자") val book = createBook("도서명", 10000, 10, "저자명", "12345") val orderCount = 11 orderService.order(member.id!!, book.id!!, orderCount) fail("예외가 발생해야 한다."); } JUnit5 @Test에 expected를 쓸 수 없게 되어있어 다른..

    [Node.js][Typescript] node_modules/@types/express-serve-static-core/index.d.ts:745:13 - error TS1005: ';' expected.

    [Node.js][Typescript] node_modules/@types/express-serve-static-core/index.d.ts:745:13 - error TS1005: ';' expected.

    오랜만에 예전에 했던 Node.js + Express + Typescript 프로젝트를 실행했더니 여러 오류가 났다...!! 😵 node_modules/@types/express-serve-static-core/index.d.ts:745:13 - error TS1005: ';' expected. ... node_modules 안에서 오류가 난거라 패키지문제인데, 구글링을 통해 이 이슈를 찾았다. https://github.com/DefinitelyTyped/DefinitelyTyped/issues/62300 @types/express-serve-static-core/index.d.ts Typescript build error (version 4.17.31) · Issue #62300 · Definitel..

    [Git] git clone 폴더 지정하기 (현재 위치, 폴더 이름 수정)

    [Git] git clone 폴더 지정하기 (현재 위치, 폴더 이름 수정)

    git clone을 가장 기본으로 사용하면 이렇게 쓸 수 있다. $ git clone {url} 이렇게하면 기본적으로 clone된 폴더가 repository이름과 같다. 현재 위치에 clone하기 이 방법을 몰랐을 땐 clone을 했다가 폴더안에 폴더가 생기기도하고, 일부러 상위 폴더로 이동해서 clone하기도 했었다. 방법은 아주 간단하다! $ git clone {url} . 이렇게 하면 현재 위치에 clone이 된다. 폴더 없이!! repository와 다른 이름으로 clone하기 이 방법을 몰랐을 때도 그냥 clone하고 폴더 이름을 수동으로 바꾸거나, 그냥 repository이름의 폴더로 사용했었다. $ git clone {url} {설정할 폴더이름} 이렇게하면 폴더 이름을 지정할 수 있다. 너무..

    [Spring Boot] No tests found for given includes: 에러

    [Spring Boot] No tests found for given includes: 에러

    Spring Boot로 테스트 작성 후 IntelliJ내의 테스트 실행버튼을 눌러 테스트를 시도했다. 그런데... Execution failed for task ':test'. > No tests found for given includes: [test코드 경로](filter.includeTestsMatching) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. 이렇게 떴다..!! 분명 @Test가 붙은 테스트들이 존재하는데...왜 없다고 하는 것인가? 인프런에 나와..

    [Spring Boot] Error creating bean with name 'entityManagerFactory' defined in class path resource

    [Spring Boot] Error creating bean with name 'entityManagerFactory' defined in class path resource

    Spring Boot, Kotlin, JPA, H2를 이용해서 API 테스트코드를 작성중이었다. Error creating bean with name 'entityManagerFactory' defined in class path resource 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.service.spi.ServiceExcepti..

    [Nginx] proxy pass 설정하기

    [Nginx] proxy pass 설정하기

    nginx기본설정으로 node.js, spring등의 서버를 3000번, 8000번 등으로 돌리게되면 http://ip주소:port번호 의 주소로 접속하게 된다. 이때 port번호를 일일히 써주지 않는 방법! 은 proxy_pass를 설정해주는 것이다. 특정 도메인 또는 ip로 접속했을때, 연결해줄 내부 포트번호를 명시해두면 매핑해주기때문이다. cd /etc/nginx/sites-available vi {서버설정파일이름} 적용할 서버파일을 열어준뒤 proxy_pass http://localhost:{port번호}; 위 이미지와 같이 location / 블록안에 port번호가 적힌 proxy_pass를 입력해주면된다. 기존에 있던 try_files $uri $uri/ =404;는 주석처리해준다. 끝

    [EC2][Ubuntu] E212: Can't open file for writing

    [EC2][Ubuntu] E212: Can't open file for writing

    문제 파일 편집을 위해 vi로 파일을 편집하고 저장하는데, 에러메세지가 나왔다. $ vi filename 에러메세지 E212: Can't open file for writing 원인 내가 파일을 편집하려고 한 위치에서 ubuntu사용자에게 편집 권한이 없었기 때문이다. 해결방법 1. vi 앞에 sudo를 붙여준다. $ sudo vi filename 2. sudo su로 root사용자로 전환하여 파일을 편집한다, $ sudo su $ vi filename