본문 바로가기

공부 기록/오류 기록

(5)
This method cannot decide whether these patterns are Spring MVC patterns or not 오류 해결 기존 코드 @Configuration @EnableWebSecurity @EnableMethodSecurity public class SecurityConfig { @Bean SecurityFilterChain filterChain(HttpSecurity http) throws Exception { return http .authorizeHttpRequests(auth -> auth .requestMatchers("/usr/register").permitAll() // 문제 발생 .requestMatchers("/usr/login").anonymous() .anyRequest().authenticated()) ... .build(); } ... } 수정한 코드1 @Configuration @EnableW..
윈도우 환경에서 H2 데이터베이스 연결 시 경로 not found 오류 해결 H2 데이터베이스 설치 https://www.h2database.com/html/download.html Downloads Downloads Version 2.1.214 (2022-06-13) Windows Installer (SHA1 checksum: 5f7cd83d394df5882ed01553935463a848979f29) Platform-Independent Zip (SHA1 checksum: 5ff027217098bf6c800ef96b98f3a381b320e53d) Version 2.1.212 (2022-04-09) Windows Installer (SHA1 check www.h2database.com 다운로드 페이지에서 최신 버전의 Windows Installer 클릭하여 .exe파일을 다운로드..
git push 시 충돌로 인해 Rebase and Merge가 불가능한 오류 해결 상황 1. 브랜치 이름을 branch1이라고 가정할 때 branch1에서 작업 후 git push origin branch1 2. PR을 올렸지만 conflicts로 인한 Rebase and Merge 불가 3. 인텔리제이에서 충돌 해결 후 다시 push -> 그러나 깃허브에선 계속 conflicts가 있다고 떴다. 해결 과정 1. branch1 브랜치에서 -> git pull --rebase origin main 2. 충돌된 코드 수정하여 해결 3. git add . 4. git rebase --continue 5. 완료되면 git push origin branch1 --force 6. 깃허브로 돌아가서 PR 확인해보면 충돌이 해결되어있다~! git pull --rebase origin main (충돌..
Updates were rejected because the tip of your current branch is behind 오류 해결 작업 후 아래와 같이 push가 되지 않았다. 데이터 유실 등과 같은 문제가 발생할 수 있어 에러가 나는 것이라고 한다. 내 경우에는 pull을 한 뒤 아주 간단한 작업을 한 이후에 이런 에러가 발생했기 때문에(데이터 유실에 대한 우려가 없기 때문에) 임시방편으로 해결을 했다. 해결법 git push origin +브랜치_이름 위와 같이 브랜치 이름 앞에 + 를 붙이면 된다.
Java file outside of source root 오류 해결 자료구조와 관련된 책으로 공부를 하던 중, 실습을 하기 위해 깃허브에서 자료를 다운로드 받았다. 그 후 필요없는 폴더들을 삭제 및 정리하고 인텔리제이로 열었더니 모든 java 파일에 Java file outside of source root 오류가 떴다. 해결법 File > Project Structure > Project Settings > Modules 에서 폴더를 직접적으로 지정해준다. Root 폴더를 클릭하고, Mark as 에 있는 Sources를 클릭한다. 필요한 경우 Test 폴더와 Resources 폴더도 같은 방법으로 지정해주면 된다.