리꾸므

H2-console 에러(feat.webAllowOthers) 본문

발걸음/오류창고

H2-console 에러(feat.webAllowOthers)

리꾸므 2022. 9. 7. 00:06

오늘의 일

 H2로 DB변경 요청을 받아서 변경하고 배포했는데! 아니 글쎄? 안되네?

다행히 한줄 추가로 끝나는 쉬운 일이었다. 그래도 킵!

 

오류

H2 Console Sorry, remote connections ('webAllowOthers') are disabled on this server.

원인

서버 배포할시 위와 같은 에러메시지가 뜨고 h2_console 접속이 차단

 

해결

application.properties에 spring.h2.console.settings.web-allow-others= true 한줄 추가!

pring.h2.console.enabled=true

//밑에 한줄만 추가하면 끝!
spring.h2.console.settings.web-allow-others= true

spring.datasource.url=jdbc:h2:mem:springcoredb
spring.datasource.username=sa
spring.datasource.password=