일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- pytest
- kotlin
- VARCHAR (1)
- vfr video
- tolerated
- Spring Batch
- 겨울 부산
- 코루틴 빌더
- JanusWebRTCServer
- mp4fpsmod
- 깡돼후
- terminal
- PytestPluginManager
- 코루틴 컨텍스트
- python
- JanusWebRTC
- JanusWebRTCGateway
- taint
- 달인막창
- PersistenceContext
- JanusGateway
- preemption #
- 자원부족
- 개성국밥
- k8s #kubernetes #쿠버네티스
- table not found
- 헥사고날아키텍처 #육각형아키텍처 #유스케이스
- 오블완
- 티스토리챌린지
- Value too long for column
목록개발/Spring Boot (32)
너와 나의 스토리
상황 먼저 다음과 같이 RestTemplate을 이용하여 통신하고 있다고 하자. "https://server-url-to-send-user-info": 유저 정보를 관리하는 서버 url 유저 서버로부터 사용자의 정보를 받아올 때 여러가지 예외가 발생할 수 있다. public class RestApi { private RestTemplate restTemplate = new RestTemplate(); public User getUser() { try { ResponseEntity response = restTemplate.exchange( "https://server-url-to-send-user-info", HttpMethod.GET, null, User.class ); return Objects.re..
서버의 상태를 확인할 수 있는 health check API를 추가해보자. 1. dependency 추가 spring-boot-actuator 모듈은 스프링 부트의 production-ready features의 모든 것을 제공한다. Maven org.springframework.boot spring-boot-starter-actuator Gradle dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' } 2. Endpoints Acuator endpoints를 사용하여 애플리케이션을 모니터링하고 상호 작용할 수 있다. Spring boot에는 여러 가지 기본 제공 endpoints가 포함되어 있으며 이..
해결책: gradle wrapper를 사용해서 빌드 환경 맞추기 build.gradle task wrapper(type: Wrapper) { gradleVersion = '7.0' } build.gradle에 위와 같은 코드를 추가하고 gradle을 reload하면 문제를 해결할 수 있다. 위 일을 수행하면 해당 프로젝트에 관련 파일이 추가될 것이다. 그러므로 문제가 해결된 후, 위 코드를 지우고 다시 reload해도 해당 문제는 발생하지 않는다.
1. settings.gradle에 최상위 프로젝트와 하위 프로젝트 설정 rootProject.name = '프로젝트 이름' include = '하위 프로젝트', '하위 프로젝트', ... 2. 최상위 프로젝트의 build.gradle에 모든 서브 프로젝트에 공통된 설정을 넣는다. dependency-management를 통한 의존성 관리 아래의 코드처럼 dependency-management를 적용시키면 Spring Boot Gradle Plugin이 Spring Boot 버전에 따라서 의존성을 자동으로 관리해준다. dependencyManagement { dependencies { dependencySet(group: 'org.springframework.boot', version: spring_bo..
Step 1 설명: 2021.03.15 - [개발/Spring Boot] - [Spring] Thymeleaf 적용해보기 - Step 1. 네비게이션 바, 입력 파라미터 설정 Step 2 코드: github.com/hovy1994/Thymeleaf/tree/step2 입력 form 만들기 이름 성별 홈페이지 주소 에 입력한 값들을 "/profile"로 보낸다. method는 post와 get 두 종류를 사용할 수 있다. 따로 객체 타입을 정의해주지 않아도 알아서 form 값들이 (Profile 객체로) 묶여서 보내지게 된다. @PostMapping("/profile") public String saveProfileInfo(Profile profile) { System.out.println("usernam..
Thymeleaf란? Thymeleaf는 web 및 독립 실행형 환경 모두를 위한 서버 측 Java 템플릿 엔진으로 HTML, XML, JavaScript, CSS 및 일반 텍스트를 처리할 수 있다. Step 1. 네비게이션 바, 입력 파라미터 설정 여기(Github)에 코드가 작성되어 있다. 1. build.gradle에 dependency implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' developmentOnly 'org.springframework.boot:spring-boot-devtools' spr..
필요한 dependency testImplementation group: 'org.mockito', name: 'mockito-inline', version: '3.7.7' Static method public class StaticMethodFunction { public static String getBlogUrl(){ return "https://hororolol.tistory.com/"; } } 위의 static method를 호출할 클래스 public class BlogService { public String getUrl() { return StaticMethodFunction.getBlogUrl(); } } 우리는 이 BlogService를 테스트할 것이고, 여기서 호출하는 StaticMet..
Json 데이터를 받을 때, 일부 필요한 데이터만 추출해서 받고 싶을 때가 있다. 예를 들어, Github webhook을 받는다고 하자. -> Github Webhook 설명 및 사용법 Github webhook의 paylaod는 다음과 같다. { "zen": "Mind your words, they are important.", "hook_id": 283587005, "hook": { "type": "Repository", "id": 283587005, "name": "web", "active": true, "events": [ "push" ], "config": { "content_type": "json", "insecure_ssl": "0", "url": "http://192.168.0.5:808..