error 4

[ERROR] javax.servlet.ServletRequest.getRemoteAddr() is not supported

[이슈 당시 상황] Back단 java application, Front단 react, nextjs를 사용해서 프로젝트를 진행 AWS EC2 인스턴스로 배포 하고, Route 53으로 DNS 연결을 하고 ACM 으로 SSL 연결 해당 EC2를 443 포트로 로드밸런싱을 처리 [이슈 내용] 특정 IP만 접속 가능하도록 설정 해두었는데, 해당 IP으로 접근이 되지 않고 javax.servlet.ServletRequest.getRemoteAddr() is not supported 에러가 발생. [해결 방안] 일반적으로 Spring Security의 인증 과정에서 HttpServletRequest를 사용하여 클라이언트의 IP 주소를 가져올 수 있습니다. 그러나 특정 환경에서는 getRemoteAddr() 메서드..

Java/Spring 2023.06.28

ERROR - Parameter index out of range ...

Mybatis 사용하는 쿼리가 들어있는 xml의 오류 Parameter index out of range (4 > number of parameters, which is 3) 이런 에러 메시지가 발생한다. 1) 파라미터가 인덱스 보다 값을 더 많이 가지고 있는 경우 2) '#{name}' 처럼 xml에 ' ' or " " 로 묶은 경우 3) 나같은 경우에서 image 컬럼에 주석 처리에 문제가 있었음 xml의 주석은 -- , /* */ 이 아니라 로 사용해야함 !!!!!!!!!!!!!!!!!!!!! 에러가 Parameter index out of range .. 정도로 나옴 반나절 삭제... INSERT INTO LODGING ( idx , name , category , area , phone , ad..

Java/Spring 2021.07.07

ERROR - Ambiguous mapping found. Cannot map ~~

Ambiguous mapping found. Cannot map 'Controller의 이름' bean method Controller에서 @RequestMapping에 이름이 중복되서 나타나는 에러 중복된 @RequestMapping 이름을 변경해주면 해결 @RequestMapping(value = "root.do", method = RequestMethod.POST) @RequestMapping(value = "root.do", method = RequestMethod.POST) -- > @RequestMapping(value = "root.do", method = RequestMethod.POST) @RequestMapping(value = "root/detail.do")

Java/Spring 2021.07.05

java: cannot access javax.inject.Provider class file for javax.inject.Provider not found

오류 사항 : java: cannot access javax.inject.Provider class file for javax.inject.Provider not found JPAQueryFactory queryFactory = new JPAQueryFactory(em); JPAQueryFactory.class 파일에서 private final Provider entityManager; provider이 inject가 안되는 오류가 발생 나의 해결 방안 pom.xml에 javax.servlet javax.servlet-api provided com.google.inject guice 3.0 javax.inject javax.inject 1 출처 참고 coderoad.ru/40822568/NoClassDe..

Java/Spring 2021.05.03