Cokes Blog
GitHub 포트폴리오
close
프로필 배경
프로필 로고

Cokes Blog

  • 분류 전체보기 (177)
    • 일상 (1)
    • 파이썬 (33)
    • Back-End (1)
      • JAVA (10)
      • Spring(Boot) (42)
      • PHP (4)
    • Front-End (15)
      • HTML-CSS (2)
      • JavaScript (4)
      • Vue.js (8)
      • TypeScript (0)
      • React (1)
    • DB (1)
    • 알고리즘, 코딩 문제풀기 (38)
    • DevOps (12)
      • Jenkins (5)
      • Docker-Kubernetes (3)
      • AWS (4)
    • Build tools (2)
      • Gradle-Maven (2)
    • Linux (3)
    • Git (2)
    • 자격증 (1)
    • 기타 (4)
    • 번외 Project (7)

    Hello, World! 홈 테스트 중 발생한 문제

    발생한 문제. mybatis 추가 한 후 mapper 를 찾을 수 없다는 오류@AutoConfigureMybatis 추가**@AutoConfigureMybatis**는 Spring Boot와 MyBatis를 통합하여 테스트를 수행할 때 MyBatis 관련 자동 구성을 활성화하는 데 사용되는 어노테이션입니다. 이 어노테이션은 일반적으로 @WebMvcTest 또는 다른 Spring Boot 테스트 어노테이션과 함께 사용되며, MyBatis의 SqlSessionFactory, SqlSessionTemplate, 그리고 Mapper 인터페이스를 테스트 컨텍스트에 로드할 수 있도록 설정합니다.@WebMvcTest(MainController.class)@AutoConfigureMybatis@ActiveProfile..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2025. 3. 20.
    • textsms

    WebClient 로 graphql 서버에 요청보내기 - mutation, variables

    https://cokes.tistory.com/172

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2023. 2. 15.
    • textsms

    스프링 WebClient로 graphql 서버에 요청응답받기

    org.springframework.boot spring-boot-starter-webflux 3.0.2 com.graphql-java-kickstart graphql-webclient-spring-boot-starter 1.0.0 WebClient 가 webflux에 포함되어 있습니다. WebClient webClient = WebClient .builder() .baseUrl("https://apijosu.com/graphql") .defaultHeader("Authorization", "Bearer user token") .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .build(); WebClient로 get,..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2023. 1. 27.
    • textsms

    스프링 Oauth2 Server jdbc 이용한 토큰 Access 토큰 로그인 마다 새롭게 발급 받기 (커스텀)

    토큰이 만료되었는지 체크해서 발급해주는 서비스인 TokenServices DefaultTokenServices를 상속받아서 CustomTokenServices 를 만들어줍니다. createAccessToken() 이 엑세스 토큰을 만들어 발급해주는 부분입니다. 기존 코드에는 isExpired()를 체크해서 만료되면 재발급해주는 방식입니다. 이 부분을 체크하지 않고 항상 새로 발급하도록 수정해주면 로그인 마다 매번 새로 발급되게 됩니다. package com.coupang.admin.server.coupang_admin_server.common.config; import org.springframework.security.core.AuthenticationException; import org.spring..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2023. 1. 2.
    • textsms

    스프링 시큐리티 Oauth2 커스텀 Exception 만들기

    @EnableAuthorizationServer public class OAuthConfig extends AuthorizationServerConfigurerAdapter { @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { endpoints. /* 다른 설정 부분 생략 */ .exceptionTranslator(authorizationWebResponseExceptionTranslator()); } public WebResponseExceptionTranslator authorizationWebResponseExceptionTranslator() { return new D..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2022. 12. 28.
    • textsms

    Spring 페이징 처리 중 MyBatis 에러

    //컨트롤러 List userList = userService.findAllPaging(startIndex, page); ...// 서비스 , 레포지토리 ... //매퍼 @Select("SELECT * FROM user limit #{startIndex}, #{pageSize}") List selectPaging(int startIndex, int pageSize); DB는 MySQL을 사용하여 limit 을 통해 0, 5 로 5개의 row만 가져오고 싶었다. 실행을 해보니 nested exception is org.apache.ibatis.binding.BindingException: Parameter 'startIndex' not found. Available parameters are [arg1, ..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2021. 7. 27.
    • textsms
    @ControllerAdvice으로 @ExceptionHandler 전역 에러 핸들러 만들기

    @ControllerAdvice으로 @ExceptionHandler 전역 에러 핸들러 만들기

    @ControllerAdvice @RestControllerAdvice 를 사용하여 @ExceptionHandler 을 전역으로 설정 컨트롤러에서 사용되는 공통 기능들을 모듈화하기 위한 어노테이션으로, @InitBinder @ModelAttribute @ExceptionHandler 세 가지 어노테이션을 지원합니다. 이 중 @ExceptionHandler 를 사용해 보았습니다. @Slf4j @RestControllerAdvice public class ExceptionHandlerAdvice { /* 400 Bad Request - 클라이언트가 유효하지 않은 요청을 보낸 경우 401 Unauthorized - 해당 서버에 클라이언트 인증이 실패한 경우 403 Forbidden - 클라이언트가 인증은 됐지..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2021. 7. 20.
    • textsms
    REST API LocalDateTime 사용할 때 문제점 해결해보기

    REST API LocalDateTime 사용할 때 문제점 해결해보기

    발생한 문제 생긴 문제는 MyBatis를 사용하여 Json 데이터를 insert하고 user 객체를 반환합니다. 이 때, id는 기본키이며, auto increment이고 det는 datetime, Current_timestamp로 현재 날짜와 시간을 자동으로 생성해줍니다. User class //User @Data public class User{ private long id; private String email; private String password; private String name; private LocalDateTime det; } User Controller //컨트롤러 @PostMapping public Object postUser(@RequestBody @Validated User..

    • format_list_bulleted Back-End/Spring(Boot)
    • · 2021. 7. 18.
    • textsms
    • navigate_before
    • 1
    • 2
    • 3
    • 4
    • ···
    • 6
    • navigate_next
      Cokes Blog
      호두와 녹두
      반응형
      전체 카테고리
      • 분류 전체보기 (177)
        • 일상 (1)
        • 파이썬 (33)
        • Back-End (1)
          • JAVA (10)
          • Spring(Boot) (42)
          • PHP (4)
        • Front-End (15)
          • HTML-CSS (2)
          • JavaScript (4)
          • Vue.js (8)
          • TypeScript (0)
          • React (1)
        • DB (1)
        • 알고리즘, 코딩 문제풀기 (38)
        • DevOps (12)
          • Jenkins (5)
          • Docker-Kubernetes (3)
          • AWS (4)
        • Build tools (2)
          • Gradle-Maven (2)
        • Linux (3)
        • Git (2)
        • 자격증 (1)
        • 기타 (4)
        • 번외 Project (7)
      최근 글
      인기 글
      최근 댓글
      태그
      • #알고리즘
      • #Java
      • #문자열
      • #자바
      • #코딩
      • #python
      • #파이썬
      • #코딩테스트
      • #pyqt
      • #백준
      전체 방문자
      오늘
      어제
      전체
      Copyright © 쭈미로운 생활 All rights reserved.
      Designed by JJuum

      티스토리툴바