Backend/Troubleshooting
[Error] @RequestBody로 String or Integer를 받으려고 할 때
@PostMapping("{id}") public void testMethod(@RequestBody String value, @PathVariable long id) { System.out.println("value = " + value); } @RequestBody 동작 순서 HTTP Clients 가 request body에 데이터를 담아 request 를 보낸다. 컨트롤러 메서드에 @RequestBody가 명시되어 있으면 해당 어노테이션이 스프링에게 request body에 담긴 데이터를 도메인 객체로 역직렬화 처리 하라고 알려준다. 추가적으로 자바 Map 으로도 역직렬화 처리를 해준다 @RequestBody Integer id 로 받을 수 없는 이유는 이때 MappingJackson2HttpMe..
[Error] Mixed Content: The page at 'https://...' was loaded over HTTPS, but requested an insecure resource
암호화된 HTTPS 페이지에 암호화되지 않은 HTTP를 통해 요청할 때 발생하는 에러다. 스프링부트에 ssl을 설치하면 된다 SpringBoot 무료 SSL 인증서 적용하기 (Certbot) 1. 필요성 SSL 인증서 없이 웹 어플리케이션을 서버에 올리면 http로 접속이 되고 아래와 같은 경고가 나타난다. "주의요함" 클릭해보면 보안이 취약하다는 문구가 뜨는게 내가 만들었지만 들어가 subbak2.com 파일을 받을땐 github를 이용해서 파일을 스프링으로 옮겼음 Error :NET::ERR_CERT_COMMON_NAME_INVALID 해결 도메인마다 ssl 인증서가 다르게 발급되는데 새로 발급되기 전의 도메인으로 요청을 해서 이런 오류가 나왔음 # VITE_SERVER_DOMAIN=https://i..
[Error][Docker] WSL 2 installation is incomplete.
1. 파워쉘을 관리자 권한으로 실행 2. 리눅스 서브시스템 활성 명령어 입력 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 3. 가상머신 플랫폼 기능 활성화 명령어 입력 dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart 4. x64 머신용 WLS2 Linux 커널 업데이트 패키지 다운로드 및 설치 wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi 5. 시스템 재시작 후 Docker 구동
[Error][SpringBoot] Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
com.mysql.jdbc.Driver가 옛날 버전이기 때문에 com.mysql.cj.jdbc.Driver로 바꿔달라는 내용 application.properties에서 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
[Error][SpringBoot] Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Spring Boot 초기 프로젝트를 Initializr를 통해서 생성 한 뒤 최초 실행 할 경우 다음과 같은 오류가 발생하면서 정상적으로 실행이 되지 않을 경우. *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you wan..
[Error][Git] src refspec main does not match any
깃에 올릴 때 명령어가 꼬이면 발생하는 에러인 것 같음 원인 : 깃허브에서 pull 없이 push 할 경우 기존 내용 삭제 문제가 생길 수 있기 때문이라고 함 .git을 삭제하고 다시 clone 받아서 하니까 잘된다