Web 242

[Spring framework Testing] 2. Unit Testing

틀린 해석이 있다면 알려주세요 https://docs.spring.io/spring-framework/docs/current/reference/html/testing.html#testing-introduction 주말이니까ㅎㅎㅎ 간단하게 스프링 테스트에 대한 공식 문서를 읽어보기로 했다. 스프링 공식문서에도 서술하고 있듯이 개발자에게 테스트는 굉장히 중요하고 스프링은 단위테스트를 위한 방법을 잘 설명해주고 있다 오늘은 Unit Test 를 맛보기로 살펴보는 걸로!! 2. Unit Testing Dependency injection DI 는 기존 EE 개발에서보다 컨테인에 대한 코드 종속성을 줄여야한다. 애플리케이션을 구성하는 POJO는 JUnit 또는 TestNG테스트가 가능해야하며 new 를 사용하거나..

Web/spring 2023.02.04

[Spring framework Web MVC docs] 1.8. Error Responses

틀린 해석이 있다면 알려주세요 https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc-ann-rest-exceptions https://www.rfc-editor.org/rfc/rfc7807.html RFC 7807: Problem Details for HTTP APIs www.rfc-editor.org A common requirement for REST services is to include details in the body of error responses. The Spring Framework supports the "Problem Details for HTTP APIs" specification, RFC..

Web/spring 2023.02.04

[Spring framework Core] 1.3. Bean Overview

틀린 해석이 있다면 알려주세요 1.3. Bean Overview Spring IoC Container 는 하나 이상의 빈을 관리한다. 이 빈은 컨테이너를 구성하는 구성 메타데이터 (XML 형식의 ) 으로 생성된다. 컨테이너 자체 내에서 이 BeanDefinition 객체로 표시된다 A package-qualified class name: typically, the actual implementation class of the bean being defined. Bean behavioral configuration elements, which state how the bean should behave in the container (scope, lifecycle callba..

Web/spring 2023.02.03

[Spring framework Data Access] 1.1. Advantages of the Spring Framework’s Transaction Support Model

틀린 해석이 있다면 알려주세요 Transaction Transaction : 데이터베이스 상태를 변화시키기 위해 수행하는 작업 단위를 말한다 쉽게 말해 sql 문으로 db 에 액세스하여 데이터베이스를 변경하는 것이다. 트랜잭션의 특징은 atomicity 원자성 : 모두 반영 또는 아예 안반영 consistency 일관성 : 작업 처리 결과는 항상 일관성있어야함 Isolation 독립성 : 두개이상의 트랜잭션이 실행되더라도 각각의 트랜잭션으로만 유지되는 것이지 서로 섞일 수 없다 (트랜잭션A, B가 실행됐을때 A가 실행 중에 B의 결과를 확인할 수 없다) Durability 지속성 : 반영되어 성공됐을 경우, 이 결과는 영구적임 근데 이건 스프링이 다 관리해주겠다는 것임 스프링 프레임워크는 이런 트랜잭션 ..

Web/spring 2023.02.03

[Hibernate validator] 6. Creating custom constraints

틀린 해석이 있다면 알려주세요 6.1. Creating a simple constraint 많은 방식의 표준 제약 조건이 정의되어있지만, 커스텀해서 사용해야할 경우가 있다. 문서를 보면서 간단한 valid constraint 를 만들어보려고 한다 참고로 간단한 제약조건이라고 되어있는데 엄청 길다 ㅋㅋㅋㅋㅋㅋㅋ To create a custom constraint, the following three steps are required: Create a constraint annotation Implement a validator Define a default error message 예제에서 사용할 클래스는 여기서 licensePlate 에 적용해볼 것이라고 한다 package org.hibernate.v..

Web/DB 2023.02.02

[Spring framework Web MVC docs] 1.3.7 ControllerAdvice

틀린 해석이 있다면 알려주세요 @ControllerAdvice 는 @Controller 가 있는 모든 곳에 initbinder, exceptionhandler, modelattribute를 어떻게 작업할지 미리 선언해준다 공통분모 같은?? @Controller 안에 @ExceptionHandler, @InitBinder, @ModelAttribute 를 선언하면 해당 컨트롤러에서만 적용된다 @ControllerAdvice, @RestControllerAdvice 를 사용하면 모든 컨트롤러에 적용이된다. as of 5.3, @ExceptionHandler methods in @ControllerAdvice can be used to handle exceptions from any @Controller or..

Web/spring 2023.02.02

[Spring framework Web MVC docs] 1.3.5 DataBinder ~ 1.3.6 Exception

공부할때마다 느끼지만..... 영어를.....잘했다면.... 번역기 안돌리고... 이게 맞게 해석한건가... 걱정하면서...공부를...안할텐데.......... ......또르르...... 아무튼... 오늘 목표는 1.3.7 까지 틀린 해석이 있다면 알려주세요 1.3.5 DataBinder @Controller or @ControllerAdvice 는 WebDataBinder 의 인스턴스를 초기화하는 @InitBinder 를 사용할 수 있다. Bind request parameters (that is, form or query data) to a model object. Convert String-based request values (such as request parameters, path varia..

Web/spring 2023.02.02
728x90