![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FmwJ4m%2FbtssUaHxgf6%2FrZ3dnNjK3qo5QoNRQtWFWk%2Fimg.png)
[자바] 람다캡쳐링에 대해서
2023. 8. 19. 18:00
몰아 넣기
"Variable used in lambda expression should be final or effectively final" 개발중 마주하게된 메세지 서치로 찾아본 결과 람다 캡쳐링이라는 키워드를 알게 되었다. 알게된 내용을 정리한다. 람다 캡쳐링이란? 람다 캡처링이란 간단히 말해 외부 범위에서 선언된 변수를 람다 식 내부에서 사용하는 것을 의미한다. 이러한 변수는 자동으로 람다 표현식의 내부에 복사되거나(캡쳐링) 최종적으로 상수로 취급된다 예제로 이해하기 아래 코드일 경우 메모리 상황은 stack에 value =3 와 list 가 쌓이고 heep에 list의 값인 1,2,3,4가 쌓였다. public static void main(String[] args) { int value = 3; List..
![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F1UUle%2FbtsgKnR1NFK%2Fq6aktM9FMKzsO1r32bJPhk%2Fimg.png)
[docker] 도커로 PostgreSQL 사용하기
2023. 5. 10. 22:40
도커
도커 이미지 설치하기 postgres - Official Image | Docker Hub Note: the description for this image is longer than the Hub length limit of 25000, so has been trimmed. The full description can be found at https://github.com/docker-library/docs/tree/master/postgres/README.md. See also docker/hub-feedback#238 and docker/ hub.docker.com 위 링크에서 Tags 탭으로 들어가면 버전을 확인할 수 있는데 원하는 버전을 선택해서 docker pull postgres:latest..
![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbrv7Ib%2FbtsgEBYcZDp%2FnP8kwoLJczJty8Vdjc2MAk%2Fimg.png)
[docker] 도커 Docker Desktop requires a newer WSL kernel version. 에러 해결하기
2023. 5. 10. 22:05
도커
정확한 원인은 모르겠지만 링크로 이동해서 알려주는대로 해결하면된다. 하지만 가독성이 안좋아 다음에는 내가 보려고 정리하려고한다. 1. Windows PowerShell을 관리자로 실행하고 아래 명령어를 차례대로 입력한다. dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 2. Linux 커널 업데이트 패키지 다운로드한다. x64 머신용 최신 WSL2 Linux커널 업데이트 패키지 다운로드 3. Windows PowerShell 에서 아..
![thumbnail](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fb3xId2%2Fbtsdi2LuLww%2F9Ix2k5d6bB9gLfxN4LD0Tk%2Fimg.png)
[SptringSecurity] 스프링 시큐리티 WebSecurityConfigurerAdapter Deprecated 대처하기
2023. 5. 1. 13:44
몰아 넣기
스프링공식블로그 에 WebSecurityConfigurerAdapter를 사용하는 것을 권장하지 않고, 컴포넌트 기반 설정으로 변경할것을 권장한다고 한다. 그래서 스프링 시큐리티 5.7.0-M2 부터 WebSecurityConfigurerAdapter는 deprecated 되었고 스프링 시큐리티 강의를 보면서 WebSecurityConfigurerAdapter를 쓰지 않고 적용하다보니 시간이 오래걸렸고 이 후 바로 쓰기위해 정리를 했다. HttpSecurity 구성 기존 @Configuration public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecu..