Rest 14

Apache JMeter 사용해보기, REST API 부하주기 (2)

1) JMeter 설치하기: https://pepega.tistory.com/86 2) REST API 부하주기: https://pepega.tistory.com/87 이전 글에서는 JMeter를 설치하고 실행까지 해봤습니다. 이번 글에서는 JMeter를 사용해서 api endpoint를 호출하고 부하를 주겠습니다! API 정보 사용할 REST API 는 아래와 같습니다. API 정보 https://goose-auth.synology.me/swagger-ui/index.html#/Health-check/healthCheck 관련 소스코드 https://github.com/GHGHGHKO/goose-auth-api-server 부하주기 전 JMeter 세팅하기 Thread Group 세팅하기 Test Pl..

테스트 2023.11.11

Apache JMeter 사용해보기, 설치 (1)

1) JMeter 설치하기: https://pepega.tistory.com/86 2) REST API 부하주기: https://pepega.tistory.com/87 가볍게 사용해보는 정도로 글을 작성했습니다 :) 틀린 내용이 있으면 댓글 달아주세요! 자세한 내용은 JMeter Best Practices를 확인하면 좋습니다! https://jmeter.apache.org/usermanual/best-practices.html 환경 OS : Windows 11 target : 이 글에서는 Rest API를 테스트 합니다. 혹은 아무 주소를 사용해도 됩니다. :) 설치하기 jmeter는 java가 설치되어 있어야 합니다. java 설치 https://docs.aws.amazon.com/corretto/la..

테스트 2023.11.08

slate docs로 API 문서 만들기 (2) - 내용 수정하기

이전 포스팅에서는 기본 페이지를 만들었습니다. 이번 포스팅에서는 원하는 내용을 수정 후 push 하여 내용이 변경되는지 확인해보겠습니다. 코드를 수정할 수 있도록 github repository에서 코드를 clone 합니다. git clone https://github.com/GHGHGHKO/slate.git Cloning into 'slate'... remote: Enumerating objects: 83, done. remote: Counting objects: 100% (83/83), done. remote: Compressing objects: 100% (75/75), done. Receiving objects: 98% (82/83)used 67 (delta 4), pack-reused 0 Rec..

docs 2023.03.01

slate docs로 API 문서 만들기 (1) - 기본 페이지 만들기

slate는 markdown 수정만으로 API 문서를 만들 수 있는 오픈소스입니다. https://awesomeopensource.com/projects/api-documentation 여기서 가장 별이 높은 오픈소스를 참고했습니다. 이 오픈소스에서는 Using Slate Natively Using Slate in Vagrant Using Slate in Docker How to Edit Slate Markdown files Publishing with Slate — Either to Github Pages, or your own server. Github Pages Custom Domain Names with Slate 위와 같은 배포 방식을 사용할 수 있게 되어있습니다. 이 블로그에서는 Github ..

docs 2023.03.01

Kotlin Springboot Rest API 만들기 2 - HelloWorld, REST API TEST CLIENT 사용하기

전체 코드 https://github.com/GHGHGHKO/pepega-blog-kotlin 이전 포스팅에서는 localhost:8080에 Username, Password를 입력하여 Whitelabel Error page를 확인했습니다. 이번 포스팅에서는 HelloWorld API를 개발 후 Postman을 활용하여 API를 호출합니다. 1. HelloWorldController 생성 package 이름 밑에 (본 글에서는 com.example.pepega) helloworld package를 생성하고 그 안에 HelloWorldController.kt를 생성합니다. HTML 삽입 미리보기할 수 없는 소스 @Controller, @RestController의 차이 https://dncjf64.tist..

Kotlin 2023.01.03

Kotlin Springboot Rest API 만들기 1 - 프로젝트 생성

전체 코드 https://github.com/GHGHGHKO/pepega-blog-kotlin 모든 IDE를 사용해도 좋습니다. 글에서는 Intellij를 활용합니다. IDE : Intellij IDEA OS : Windows 10 1. 프로젝트 생성 https://start.spring.io/ 위 링크에서 프로젝트를 생성합니다. JPA를 활용하기 위한 Spring Data JPA 무분별한 API 호출을 방지하기 위한 Spring Security 요청(Request body) 유효성 체크를 위한 Validation RESTful API를 생성하기 위한 Spring Web 로컬 테스트를 위한 H2 Database 개발 환경 구축을 위한 PostgreSQL(다른 DB도 상관 없습니다.) 코드를 Github에..

Kotlin 2023.01.02

springboot로 Rest api 만들기(8) SpringSecurity를 이용한 인증 및 권한부여

전체 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_8 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com 이전 포스팅에서는 Spring에서 메시지를 처리하는 방법에 대해서 알아봤고 MessageSource를 이용하여 Exception Message를 고도화하였다. swagger에서 response body의 내용을 한글, 영어로 바꾸며 도출하는 내용을 포스팅 했었다. ​ 이번 포스팅에서는 SpringSecu..

SpringBoot 2021.10.22

springboot로 Rest api 만들기(7) MessageSource를 이용한 Exception 처리

시작 전 변경 사항이 있다! (2022.07.18 수정) https://github.com/akkinoc/yaml-resource-bundle/issues/103 bug: No libraries found for 'dev.akkinoc.util.YamlResourceBundle' · Issue #103 · akkinoc/yaml-resource-bundle Describe the bug use Gradle Groovy DSL I found No libraries found for 'dev.akkinoc.util.YamlResourceBundle' To Reproduce implementation 'dev.akkinoc.util:yaml-resource-bundle:2.4.1'... github.com 해..

SpringBoot 2021.10.22

springboot로 Rest api 만들기(6) ControllerAdvice를 이용한 Exception 처리

전체 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_6 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com ​ 이전 포스팅에서는 본격적으로 API 서버 개발을 하기 전 API 인터페이스 및 결과 데이터 구조를 살펴보고 확장 가능한 형태로 설계해보았다. ​ API 성공에 대한 내용만 포스팅했지만 이번 포스팅에는 실패 시 ExceptionHandling과 결과 Message 처리에 대한 내용을 살펴보도록 하겠다...

SpringBoot 2021.10.22

springboot로 Rest api 만들기(5) API 인터페이스 및 결과 데이터 구조 설계

전체 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_5 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com 이전 포스팅에는 swagger를 활용하여 API 문서를 자동화하는 웹페이지를 제작했다. ​ 이번 포스팅에는 API 서버 개발을 본격적으로 진행해 보기 위해 현재 API 인터페이스 및 결과 데이터의 구조를 살펴보고 확장 가능한 형태로 설계할 것이다. ​ API는 제공 대상이 클라이언트 APP이나 WEB 개..

SpringBoot 2021.10.22