| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- psycopg2
- Docker
- insert into
- uuid
- mysql
- JWT
- python
- spring
- Spring Security
- Java
- postgresql
- JSON Web Token
- JPA
- spring boot
- postgres
- RDB
- nginx
- #mojo
- Linux
- QGIS
- hadoop #hdfs
- AuthenticationPrincipal
- LazyInitializationException
- posgis
- 1093
- Failed to load ApplicationContext
- sftp
- Kafka
- Maven
- Geoserver
- Today
- Total
목록spring (4)
FOREST_CHOI's BLOG
MSA 강의를 보면서 포트 번호를 가져올 일이 생겼다. 근데 뭔가.. 강의처럼 가져와 지지 않았었다... 그래서 그냥 구글링 해서 찾은거 가져온 것이다. 아래 class에도 @NoArgsConstructor, @AllArgsConstructor을 붙여줄까 했는데 귀찮아서 생략~ @Component @Getter @NoArgsConstructor @AllArgsConstructor public class Greeting { @Value("${greeting.message}") private String message; private String serverPort; public void setServerPort(String serverPort){ this.serverPort = serverPort; } }..
MSA 강의를 따라하다가 이런 오류가 발생했다. userServiceImpl 과 webSecurity를 무한참조? 하는 느낌이 들었다. 그래서 인터넷을 찾아보니까 WebSecurity에서 UserService를 참조하고 있고, UserSerivce에서 BCryptPasswordEncoder를 사용하기 위해 SecurityConfig를 참조하기 때문에 참조 사이클이 생겨 발생하는 것이라고 했다. public interface UserSerivce extends UserDetailsService{ } 이런 형식으로 UserServiceImpl에서 구현을 바로 할 수 있게 해 주었다. 하지만 이를 해결하기 위해서는 UserDetailsService를 따로 class로 구현하여 UserDetailsService..
Spring 2.7.x 이상의 버전부터 Spring Security 의 WebSecurityConfigurerAdapter를 사용해서 config를 사용할 때 오류가 발생했다. 공식홈페이지에는 이제 사용을 권장핮지 않는다고 되어있다. https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter Spring Security without the WebSecurityConfigurerAdapter In Spring Security 5.7.0-M2 we deprecated the WebSecurityConfigurerAdapter, as we encourage users to move towards a com..
일단 server.port = 0 이라는 것은 랜덤 포트를 사용하겠다는 의미이다. 반대로 server.port = 8080과 같이 하나의 포트를 지정해서 사용해 줄 수 있다. 이 두 가지 경우에서 spring boot에 포트번호를 불러오는 부분이 서로 다른데, 첫 번째로 server.port = 8080 과 같이 하나의 포트를 지정해 준경우이다. @Value("${local.server.port}") private int port; 와 같이 간단하게 불러 올 수 있다. 두번째로는 server.port = 0 과 같이 랜덤 포트를 사용하는 경우이다. 이 경우에 @Value("${server.port}") 이렇게 사용하게 된다면 0 이라는 포트 번호가 출력하게 될 것이다. 이 경우에는 두 가지 경우의 수가 ..