본문 바로가기

분류 전체보기590

[프로그래머스, java] 신고 결과 받기 문제 회고 : 대학생 때는 C, 이후에는 파이썬으로 코테 문제 풀다가, java로 코딩 테스트 문제 처음 풀어보니 굉장히 낯설다. 맨날 파이썬에서 list, dict 편하게 쓰다가 int[], string[] 마주치니 뭔가 싶었는데 예전에 배열을 저렇게 썼었던 게 뒤늦게 기억이 났다. hashmap 반복문 돌리기 상당히 귀찮기도 함. 문법 검색해가면서 돌아가도록은 구현하였고 다른 사람 작성한 코드 보면서 공부해야 할 듯. // 한 유저가 동일한 유저 신고했을 때 카운트 1회로 처리해야 함 // 특정 유저가 n번 이상 신고되었을때 그 신고한 유저에게 메일 보내야 함. import java.util.Arrays; import java.util.List; import java.util.ArrayList; impor.. 2022. 7. 13.
[에러해결] Unable to find GatewayFilterFactory with name AuthorizationHeaderFilter 에러 : Unable to find GatewayFilterFactory with name AuthorizationHeaderFilter 원인 : filter 소스코드를 복사 붙여넣기 할 때 위치를 잘못 복붙하여서 필터를 찾지 못하였던 에러였음. 해결 : 소스코드 정확한 위치에 재대로 복사 붙여넣기 해서 에러 해결 2022. 7. 11.
Spring Security - Authentication + Authorization 1. step 1 org.springframework.boot spring-boot-starter-security 2. step 2,3,4,6 @Configuration @EnableWebSecurity public class WebSecurity extends WebSecurityConfigurerAdapter { //권한과 관련된 작업업 @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable(); http.authorizeRequests().antMatchers("/users/**").permitAll(); http.headers().frameOptions().disable(); } } 3... 2022. 7. 8.
modelmapper org.modelmapper modelmapper 2.3.8 @Override public UserDto createUser(UserDto userDto) { userDto.setUserId(UUID.randomUUID().toString()); ModelMapper mapper = new ModelMapper(); mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); UserEntity userEntity = mapper.map(userDto, UserEntity.class); userEntity.setEncryptedPwd("encrypted_password"); userRepository.save(userEntity); .. 2022. 7. 6.