Skip to content

backend setting

lkoiescg2031 edited this page Oct 31, 2021 · 11 revisions

개발 환경

java version 8

m1 mac bigsur

intellij

spring 설정

spring initializr 로 스프링 초기화

  • spring web, mybatis framework, lombok, postgre jdbc, ...

db 설정

postgres mac 설치

brew install postgres
initdb /usr/local/var/postgres
brew services start postgresql
pg_ctl -D /usr/local/var/postgres -l logfile start

postgres spring 연동

db 설정 issue

Q1. psql 명령 실행시 에러 발생

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?

A1. 서버를 시작해줌

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

logger 설정

log4j2 설정

log4jdbclog4j2

Clone this wiki locally