inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

스프링 데이터 JPA

관계형 데이터베이스와 자바

url, username, password 오류가 나옵니다

2252

엄정재

작성한 질문수 6

0

Exception in thread "main" org.postgresql.util.PSQLException: Ä¡¸íÀû¿À·ù: »ç¿ëÀÚ "keesun"ÀÇ password ÀÎÁõÀ» ½ÇÆÐÇß½À´Ï´Ù (pgjdbc: autodetected server-encoding to be ISO-8859-1, if the message is not readable, please check database logs and/or host, port, dbname, user, password, pg_hba.conf)

at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:520)

at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:141)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)

at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)

at org.postgresql.Driver.makeConnection(Driver.java:458)

at org.postgresql.Driver.connect(Driver.java:260)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at me.whiteship.Application.main(Application.java:15)

---------------------------------------------------------------

 

package me.whiteship;

 

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

 

public class Application {

 

public static void main(String[] args) throws SQLException {

 

String url = "jdbc:postgresql://localhost:5432/springdata";

String username = "keesun";

String password = "pass";

 

try(Connection connection = DriverManager.getConnection(url, username, password)) {

System.out.println("Connection created : " + connection);

}

}

 

}

윈도우 사용중입니다.

 

도커에서 생성하고 돌아가는거 확인하고

postgresql도 설치했는데 이런 에러가 뜨네요

JPA spring java

답변 1

0

백기선

DB 인코딩 문제 같습니다. 도커 이미지로 컨테이너 생성할 때 인코딩을 설정하는 옵션이 있을 겁니다. 어떤 옵션을 어떻게 설정할 수 있는지 찾아보시고 UTF-8로 설정해 보세요.

spring boot 2.7.13-SNAPSHOT trace 소문자 로그 안나옴

0

533

1

<스프링 데이터 Common: 기본 리포지토리 커스터마이징> 에 대한 질문

0

392

1

comment table에서 저장될떄 왜 id값이 2부터저장이되는건가요?

0

407

1

@EnableJpaRepositories 설정을 스프링부트가 어디에서 자동설정하나요?

0

451

0

PersistenceContext 관련 질문드립니다.

0

335

1

지금(Eager), 나중에(Lazy)의 의미를 모르겠습니다

0

338

1

transaction 구간이 길어질 경우의 처리방법 문의드립니다.

0

905

1

docker postgres

0

293

1

Multiple DataSource 사용 시 transaction 관련 질문 드립니다.

0

2908

1

entity 중 null이 아닌 필드만 update 할 방법이 있을까요?

0

1191

1

Eager 모드일 경우, join을 inner join으로 바꾸는 법이 있을까요?

0

385

1

엔티티를 상속받는 DTO가 일반적인가요?

1

1847

1

커스텀 타입 클래스를 String 타입 처럼 이용해 쿼리하는 방법에 대해 질문하고 싶습니다.

0

339

1

연관관계 매핑 어떤식으로 해야될지 감이 안잡힙니다.

0

566

4

EntityManager 주입시 Annotation관련 질문드립니다.

0

565

1

클래스 기반 프로젝션 사용 관련 질문

0

560

1

save 메서드 질문드립니다.

0

258

1

복잡한 통계쿼리도 JPA로 가능한가요?

2

5593

1

find 와 get의 차이가 무엇인가요?

0

890

1

실무에서 JPA 할 때 FK로 개발할때 연관관계를 꼭 맺어주어야 하나요?

0

999

1

\dt Did not find any relations.

0

481

1

소스코드는 어디서 볼 수 있을까요?

1

287

1

table 생성과 select 문에 대한 질문

0

174

1

스프링 데이터 RepositoryTest 관련 질문

0

2173

2