Spring Docs 31

[Spring framework testing] 5. Spring TestContext Framework (1)

https://docs.spring.io/spring-framework/docs/current/reference/html/testing.html#testcontext-framework Testing The classes in this example show the use of named hierarchy levels in order to merge the configuration for specific levels in a context hierarchy. BaseTests defines two levels in the hierarchy, parent and child. ExtendedTests extends BaseTests and instruct docs.spring.io 틀린 부분이 있으면 알려주세..

Web/spring 2023.02.09

[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

[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
728x90