본문 바로가기

intellij +springboot/오류정리

(31)
스프링 시큐리티(Spring Security) - 로그인 로직 안됨 403 404 시큐리티 로그인 중 로그인 요청을 해도 계속 denied 된다.. configure 에 .loginProcessingUrl 맞게 셋팅하고 요청을 보냈는데 계속 안돼서 찾아보니 csrf 문제 라는 자료를 찾음.. 에러페이지를 지정했을 때 404나 405가 뜨면 csrf를 의심하자 (csrf 오류로 403이 뜨고 그 403을 처리할 에러페이지 지정 오류로 다시 404나 405가 발생할 수 있다) 해결 방법은configure 셋팅에 .and().csrf().disable(); 를 추가해줬다 @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/admin/**")...
A bean with that name has already been defined in class path 문제 해결하기 SecurityConfiguration을 작성하던 중에 에러가 발생했다. authenticationManagerBean이 중복선언되었다는 내용이다. 열심히 오버라이딩을 할 방안을 찾다가 action에 있는 문구를 발견했다. Action: Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true. spring.main.allow-bean-definition-overriding=true 그래서 application.yml로 가서 spring. 밑에 아래와 같은 내용을 추가했다. properties 인경우 spring.main.allow-bean-defin..
template might not exist or might not be accessible by any of the configured Template Resolvers 화면 템플릿을 찾지 못했다 는 에러 템플릿 이름을 잘 살펴보거나 경로를 맞춰줘야 한다 나같은 경우에는 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exce ption [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/fragment/header], template might not exist or might no t be accessible by any of the configured Template Resolvers (template: ..
[Error] jdbcUrl is required with driverClassName. defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans .BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception ..
[mediumtext (Types#LONGVARCHAR)], but expecting [varchar(255) (Types#VARCHAR)] le to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [column_name] in table [TableName]; found [mediumtext (Types#LONGVARCHAR)], but expecting [varchar(255) (Types#VARCHAR)] 대용량 텍스트를 추가해야돼서 varcahr 에서 mediumtext 로 칼람 데이터 타입을 변경했더니 생긴 에러 찾아보니 jpa 에서는 mediumtext 같이 긴 문자열을 쓰려면 따로..
[React 에러 일지] Cannot read properties of undefined... Uncaught TypeError: Cannot read properties of undefined (reading 'filter') 자바스크립트 에러 Top 10 🚫 Top 10 JavaScript errors from 1000+ projects (and how to avoid them) Uncaught TypeError: Cannot read property ... TypeError: ‘undefined’ is not an object ... TypeError: null is not an object ... (unknown): Script error TypeError: Object doesn’t support property TypeError: ‘undefined’ is not a function U..
Unexpected use of 'location' no-restricted-globals eslint - 명시적 전역 변수 react 예제를 분석하는 중 clone받은 소스에서는 에러가 나지 않았던 부분인데, 새로 만든 프로젝트에서는 ESLint상에서 에러가 발생하는 걸 발견했다. location이나 history 같은 전역 변수를 ESLint가 참조할 수 있게 주석으로 명시해 주는 것이다. 같은 eslint-config-airbnb-base 패키지를 사용하지만 예제 프로젝트는 v15.1.0이고 내가 설치한 최신 버전은 v16.1.0 이었다. v15.1.0로 설치하고 나니 에러가 사라졌다. 만약 v16.1.0을 사용한다고 하면 eslintrc 설정에 다음 rule을 추가하면 된다. "no-restricted-globals": ["off"] 파일에 주석으로 eslint rule을 변경해주는 방..
Unable to load class named [io.jsonwebtoken.impl.DefaultHeader] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found. Have you remembered to include the jjwt-impl.jar in yo.. Unable to load class named [io.jsonwebtoken.impl.DefaultHeader] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found. Have you remembered to include the jjwt-impl.jar in your runtime classpath? 로그인 잘 되다가 토큰 생성하는 곳에서 갑자기 에러가 터졌다 찾아보니 .. Springboot에 jwt를 연결하여 토큰을 발급받으려고 하는데 오류가 났다. io.jsonwebtoken.lang.UnknownClassExcept..