[React] 개요
·
React
React: 사용자 인터페이스(UI)를 구축하기 위한 자바스크립트 라이브러리 -공식사이트https://ko.react.dev/ ReactReact is the library for web and native user interfaces. Build user interfaces out of individual pieces called components written in JavaScript. React is designed to let you seamlessly combine components written by independent people, teams, and organizatiko.react.dev 왜써야하나? 주요 특징 1. 컴포넌트 기반 유연성UI를 독립적인 재사용 가능한 컴포넌트로 나누..
[Error] localhost에서 리디렉션한 횟수가 너무 많습니다.
·
Error
✅ 상황→ SpringBoot - security 권한 설정 중 발생✅ 오류→ localhost에서 리디렉션한 횟수가 너무 많습니다.✅ 문제원인→ 권한없을 시 로그인페이지 이동 설정그러나 로그인페이지 또한 권한설정 x라 로그인페이지 -> 로그인 페이지 무한 반복✅ 해결방법→ 로그인 페이지에 모두가 접근 가능 하게 설정
[Error] java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig
·
Error
더보기더보기java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfigatorg.springframework.test.context.web.AbstractGenericWebContextLoader.configureWebResources(AbstractGenericWebContextLoader.java:201)at org.springframework.test.context.web.AbstractGenericWebContextLoader.loadContext(AbstractGenericWebContextLoader.java:128)at org.springframework.test.context.web.AbstractGenericWebContextLoa..
[Error] Port 80 required by Tomcat v9.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port
·
Error
✅ 상황→ 서버 실행시 발생✅ 오류→ Port 80 required by Tomcat v9.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).✅ 문제원인→ 80 포트 번호가 이미 사용 중✅ 해결방법→ 포트 죽이기터미널 열기lsof -i :80 치면COMMAND    PID  USER   FD   TYPE             DEVICE SIZE/OFF..
[Error] java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 구성요소 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]을(를) 시작하지 못했습니다.
·
Error
✅ 상황→ pom.xml 버전 수정 후 톰캣 실행 오류발생✅ 오류→ java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 구성요소 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]을(를) 시작하지 못했습니다.✅ 문제원인→ ✅ 해결방법→ 1. Servers 탭 > Tomcat 우클릭 > Clean2. Servers 탭 > Tomcat 우클릭 > Clean Tomcat Work Direcotry3. Menu > Project > Clean4. Project Explorer > 프로젝트 우클릭 > Maven > Update Projec
[Error] org.springframework.beans.factory.BeanCreationException
·
Error
✅ 오류→ org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactoryBean' defined in ServletContext resource [/WEB-INF/spring/db-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource:~✅ 문제원인→ 빈 생성 시 예외 발생✅ 해결방법→ @추가
[Error] org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping 부적합한 열 유형: 1111
·
Error
✅ 오류→org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='productContents', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for para..
[Error] Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
·
Error
✅ 오류→ Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException✅ 문제원인→ 주요 원인mapper id가 틀린 경우Parameter bean의 field 명이 틀린 경우sql.xml에서 정의된 namespace와 DAO에서 호출하는 namespace가 다를 경우mapper가 정의되어 있지 않거나 스펠링이 틀린 경우mapper에 정의된 namespace 명칭이 같은 application 내에 중복 될 경우✅ 해결방법→ id 오타,,
[Java] 예외처리(Exception handling)
·
Java
1. try ~ catch- 하나의 try에 여러개의 catch 가능- catch에 밑으로 가면서 더 넓은 부모타입을 선언- try의 {} catch의 {} 에 선언된 지역변수try { 예외가 발생할 수 있는 구문들 작성}catch(발생한 예외 객체 타입 선언){ 예외처리 구문}catch(발생한 예외 객체 타입 선언){ 예외처리 구문}catch(발생한 예외 객체 타입 선언){ 예외처리 구문}finally { 예외가 발생하든 안하든 무조건 실행 하는 영역} 2. Throws- 예외처리를 자기가 하는 것이 아니라 메서드를 호출한 쪽으로 위임 메서드 선언부 () throws 예외객체타입명1, 예외객체타입명2, ... {} -사용자 정의 예외 클래스1. 예외 클래스 선언- 예외 클래스 선언하고 Exception..
[Java] 인터페이스(interface), 상속, 구현
·
Java
인터페이스(interface):추상 메서드 집합(프로그래밍 관점)- 오직 추상 메서드와 상수만을 멤버로 가짐. (iv,cv 변수 x)-껍데기인 설계도- 모든 멤버가 publicinterface 인터페이스명 { (public) (static) (final) 타입 상수명 = 값; //상수 (public) (abstract) 메서드명 (매개변수들); //추상 메서드}-인터페이스 모든 멤버변수 public static final이므로 생략가능-인터페이스 모든 멤버메서드 public abstract이므로 생략가능단, static,디폴트 메서드는 예외 인터페이스 상속- 인터페이스는 인터페이스로부터만 상속 받을 수 있음.- Object클래스가 최고조상x, 인터페이스 조상은 인터페이스- 다중상속 가능(조상..