Web/spring 113

[Spring Exception] Hibernate Mapping Exception – Unknown Entity

https://www.baeldung.com/hibernate-mappingexception-unknown-entity Exception 시리즈 마지막 ~! org.hibernate.MappingException: Unknown entity Hibernate와 Spring 및 Hibernate 환경 모두에 대한 알 수 없는 엔티티 문제 및 해결방법이다 Missing or Invalid @Entity Annotation 1. @Entity 주석이 누락된 엔티티 클래스의 경우 public class Foo implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; public Foo() { supe..

Web/spring 2023.04.10

[Spring Exception]Guide to Spring NonTransientDataAccessException

https://www.baeldung.com/nontransientdataaccessexception 막바지로 달려가는 중.. 나중에 포스팅한거 정리 좀 해야겠다ㅜㅜ NonTransientDataAccessException The Base Exception Class 일시적이지 않거나 영구적인 데이터 액세스 관련 예외처리를 나타냄 이 예외가 발생되면 그 이후 해결할 때 까지 모든 시도를 실패하게 됨 Subclasses of this main exception class represent data access related exceptions which are considered non-transient or permanent. Simply put, that means that – until the roo..

Web/spring 2023.04.10

[Spring Exception] Spring NoSuchBeanDefinitionException

https://www.baeldung.com/spring-nosuchbeandefinitionexception + 예외처리 리스트 https://www.baeldung.com/spring-exceptions Spring org.springframework.beans.factory.NoSuchBeanDefinitionException. Spring Context에 정의되지 않은 bean을 해결하려고 시도할 때 BeanFactory 에 의해 발생하는 일반적인 예외들이다 Cause: No Qualifying Bean of Type […] Found for Dependency 단순히 정의되지 않은 빈을 주입하려고 시도하는 경우 예시코드 @Component public class BeanA { @Autowired..

Web/spring 2023.04.09

[Spring Exception] Spring BeanDefinitionStoreException

https://www.baeldung.com/spring-beandefinitionstoreexception Spring org.springframework.beans.factory.BeanDefinitionStoreException 일반적으로 bean 정의가 유효하지 않을 때 BeanFactory 의 책임이며 해당 bean의 로딩에 문제가 있는 경우 Cause: java.io.FileNotFoundException BeanDefinitionStoreException 이 기본 IOException 에 의해 발생할 수 있다. IOException Parsing XML Document From ServletContext Resource DispatcherServlet 이 Spring MVC용 web.xml ..

Web/spring 2023.04.08

[Spring Exception] Spring DataIntegrityViolationException

https://www.baeldung.com/spring-dataIntegrityviolationexception Spring org.springframework.dao.DataIntegrityViolationException DataIntegrityViolationException and Spring Exception Translation Spring 예외 변환 메커니즘은 컨텍스트에서 예외 변환 빈 포스트 프로세서 빈을 정의하여 @Repository 로 주석이 달린 모든 빈에 적용할 수 있다. @Configuration public class PersistenceHibernateConfig{ @Bean public PersistenceExceptionTranslationPostProcessor exce..

Web/spring 2023.04.08

[Spring] Async Support with Spring MVC and Spring Security

https://www.baeldung.com/spring-mvc-async-security 비동기 요청에 대한 Servlet 3 과 MVC, Security 에 관련된 내용이다 참고로 Spring Security는 MVC 범위 밖에서 @Async 와 통합되고 HTTP 요청도 처리합니다. implementation 'org.springframework.boot:spring-boot-starter-security' testImplementation 'org.springframework.security:spring-security-test' Spring MVC and @Async WebAsyncManager https://docs.spring.io/spring-framework/docs/current/java..

Web/spring 2023.04.06

[Spring] A Guide To Spring Redirects

https://www.baeldung.com/spring-redirect-and-forward implementing a Redirect in Spring and will discuss the reasoning behind each strategy. Why Do a Redirect? Spring 애플리케이션에러 리디렉션을 수행해야하는 이유는 많다 양식 데이터를 POST하거나 이중 제출 문제를 해결하거나, 실행 흐름을 다른 Controller Method에 위임하는 경우 등이 있다 ** 일반적으로 Post, Redirect, Get 패턴은 이중 제출 문제를 적절하게 해결하지 못하므로 초기 제출 완료 전에 페이지를 새로 고치는 것과 같은 문제는 여전히 이중 제출로 이어진다. Redirect With the ..

Web/spring 2023.04.06

[Spring] Spring MVC Custom Validation

https://www.baeldung.com/spring-mvc-custom-validator https://www.baeldung.com/spring-boot-bean-validation 8자리 이상 11자리 이하의 전화번호 값이 제대로 들어왔는지 확인하는 Validation 을 만들어본다 The New Annotation new @interface to define our annotation @Documented @Constraint(validatedBy = ContactNumberValidator.class) @Target( { ElementType.METHOD, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) public @interface C..

Web/spring 2023.04.05

[Spring Security] Handle Spring Security Exceptions

https://www.baeldung.com/spring-security-exceptions Spring Security는 비즈니스 로직에 대한 호출을 제어하거나 특정 URL에 대한 HTTP 요청 액세스를 제한한다 해당 보안 계층에서 Exceptions 처리가 어떻게 진행되는지 알아보자 Authentication Success Handler Authentication Failure Handler Access Denied Handler Security Configuration This will be in charge of managing all the security configurations of the application SecurityFilterChain @Bean public SecurityFil..

Web/spring 2023.04.04
728x90