전체 글 338

[Spring Test] Guide to JUnit 5 Parameterized Tests

https://www.baeldung.com/parameterized-tests-junit-5 Guide to JUnit 5 Parameterized Tests | Baeldung Learn how to simplify test coverage in JUnit 5 with parameterized tests www.baeldung.com JUnit5 는 여러 유용한 기능으로 테스트를 쉽게 할 수 있게 한다 특히 Parameterized 된 테스트를 이용하면, 다른 매개변수를 사용하여 단일 테스트를 여러번 실행할 수 있어 유용하다 https://junit.org/junit5/docs/current/user-guide/#running-tests-ide-eclipse JUnit 5 User Guide Alth..

Web/spring 2023.04.03

[Annotation] Spring Bean Annotations

https://www.baeldung.com/spring-bean-annotations 애노테이션 시리즈 마지막~~!! Spring 컨테이너에서 빈을 구성하는 방법 1. XML 구성을 사용하여 선언 2. 구성 클래스에서 @Bean 애노테이션 사용 3. org.springframework.stereotype 패키지 의 주석 중 하나로 클래스를 표시 (leave the rest to component scanning) Component Scanning Spring은 Component Scanning이 활성화된 경우 bean에 대한 패키지를 자동스캔할 수 있다 @ComponentScan은 어노테이션 구성으로 클래스를 검색할 패키지를 구성한다 // basePackages 또는 값 인수 중 하나를 사용하여 기본 ..

Web/spring 2023.04.01

[Spring MVC] @Controller 와 @RestController 차이

https://www.baeldung.com/spring-controller-vs-restcontroller Spring 4.0은 RESTful 웹 서비스 생성을 단순화하기 위해 @RestController 주석을 도입했다. @Controller 와 @ResponseBody를 결합한 편리한 주석으로 컨트롤러 클래스의 모든 요청 처리 메서드에 @ResponseBody 주석을 달 필요가 없다. Spring MVC @Controller simply a specialization of the @Component class, which allows us to auto-detect implementation classes through the classpath scanning. typically use @Contr..

Web/spring 2023.04.01

[Annotation] Spring Scheduling Annotations

https://www.baeldung.com/spring-scheduling-annotations org.springframework.scheduling.annotation 단일 thread 보다 더 복잡한 실행이 필요할 경우에 사용함 @EnableAsync 이 애노테이션은 Spring에서 비동기 기능을 활성화 한다 @Configuration 과 함께 사용해야 한다 *** @Configuration @EnableAsync class VehicleFactoryConfig {} 이렇게 비동기 호출을 활성화 시킨 후 원하는 메서드에 @Async 를 붙여서 정의하면 된다 @EnableScheduling 이 애노테이션을 사용하여 스케쥴링을 활성화 한다 @Configuration 과 함께 사용해야 한다 *** @C..

Web/spring 2023.03.31
728x90