250x250
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- JSON Web Token
- insert into
- Spring Security
- Docker
- spring
- RDB
- sftp
- JPA
- spring boot
- hadoop #hdfs
- psycopg2
- JWT
- #mojo
- Linux
- Maven
- 1093
- nginx
- mysql
- LazyInitializationException
- QGIS
- postgresql
- posgis
- uuid
- AuthenticationPrincipal
- Geoserver
- Java
- Failed to load ApplicationContext
- python
- postgres
- Kafka
Archives
- Today
- Total
FOREST_CHOI's BLOG
java.lang.UnsupportedOperationException: public abstract java.lang.String javax.servlet.ServletRequest.getRemoteAddr() is not supported 본문
프로그래밍/Spring Boot
java.lang.UnsupportedOperationException: public abstract java.lang.String javax.servlet.ServletRequest.getRemoteAddr() is not supported
Forest_Choi 2022. 10. 2. 01:29728x90
마이크로 서비스 관련 강의를 듣던 도중 Spring Cloud Config 를 설정하는 부분에서 오류가 발생했다.
원인은 yaml파일의 IP addr와 user-micro-service에 작성한 IP address 가 서로 다르기 떄문에 발생하였다.
- 회사에서 공부하는데, 집, 회사 IP가 다르니까 당연한 것이다.
http.authorizeRequests().antMatchers("/**")
.hasIpAddress("{ ip address }")
.and()
.authenticationManager(authenticationManager)
.addFilter(getAuthenticationFilter(authenticationManager));
token:
expirationTime: 86400000
secret: dbgkdus_tkfkdgo_dnfltkfkdduddnjsgkwk
gateway:
ip: { IP Address }
java 코드와 yaml 코드에서 의 IP정보를 동일하게 맞춰주면 해결이된다.
728x90
'프로그래밍 > Spring Boot' 카테고리의 다른 글
| Spring MVC? (0) | 2022.10.15 |
|---|---|
| Spring? (0) | 2022.10.15 |
| 포트번호 가져오기 (0) | 2022.09.27 |
| Relying upon circular references is discouraged and they are prohibited by default. .... (0) | 2022.09.27 |
| WebSecurityConfigurerAdapter (0) | 2022.09.22 |
Comments