There is no getter for property named 'password' in 'class com.example.login.vo.UserVO'

2021. 9. 19. 17:55·Spring Framework Error

위와같은 오류가 발생하여 확인하여보니 SQL컬럼과 VO클래스 변수명중 password를 VO클래스에는 pw로 다르게 써서 발생한 오류였습니다. DB컬럼명과 VO클래스의 변수명은 꼭 잘 맞춰줘야 할 것 같습니다

 

(1 )SQL

1
2
3
4
5
6
7
Create table login_user(
    id varchar(100) primary key,
    password varchar(20) NOT NULL,
    name varchar(20) NOT NULL,
    join_date Timestamp default now()
    
);
Colored by Color Scripter
cs
 

 

(2) VO클래스

 
package com.example.login.vo;
 
import java.util.Date;
 
public class UserVO {
    private String id;
    private String pw;
    private String name;
    private Date joinDate;
    
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getPw() {
        return pw;
    }
    public void setPw(String pw) {
        this.pw = pw;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Date getJoinDate() {
        return joinDate;
    }
    public void setJoinDate(Date joinDate) {
        this.joinDate = joinDate;
    }
    @Override
    public String toString() {
        return "UserVO [id=" + id + ", pw=" + pw + ", name=" + name + ", joinDate=" + joinDate + "]";
    }
    
    
}
 
Colored by Color Scripter
cs

'Spring Framework Error' 카테고리의 다른 글

Oracle DB 연결 과정중 The Network Adapter could not establish the connection 오류가 발생하였을때.  (0) 2021.12.12
Starting Tomcat v9.0 Server at localhost' has encountered a problem 또는 Web server failed to start. Port 8080 was already in use 같은 톰캣 서버 충돌 오류 발생 시  (0) 2021.12.11
Tomcat 서버는 작동하는데 Spring Boot가 실행이 안되어서 HTTP 상태 404 - 찾을수 없음 에러가 발생하였을때  (0) 2021.12.10
Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'password' at row 1  (0) 2021.09.20
Forwarding to error page from request [/list] due to exception [/WEB-INF/views/list.jsp (행: [32], 열: [59]) JSP 스펙에 따르면, 속성 이름은 반드시 whitespace 다음에 나타나야 합니다.]  (0) 2021.09.18
'Spring Framework Error' 카테고리의 다른 글
  • Starting Tomcat v9.0 Server at localhost' has encountered a problem 또는 Web server failed to start. Port 8080 was already in use 같은 톰캣 서버 충돌 오류 발생 시
  • Tomcat 서버는 작동하는데 Spring Boot가 실행이 안되어서 HTTP 상태 404 - 찾을수 없음 에러가 발생하였을때
  • Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'password' at row 1
  • Forwarding to error page from request [/list] due to exception [/WEB-INF/views/list.jsp (행: [32], 열: [59]) JSP 스펙에 따르면, 속성 이름은 반드시 whitespace 다음에 나타나야 합니다.]
「김동윤」
「김동윤」
개발을 하면서 기록하고 공유하는 공간입니다
  • 「김동윤」
    평범한 개발 블로그
    「김동윤」
  • 전체
    오늘
    어제
    • 분류 전체보기 (21)
      • DB (3)
      • Git (1)
      • Spring Framework (6)
      • Spring Framework Error (9)
      • JS (2)
        • node.js (1)
        • react (1)
      • 머신 러닝 (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • 개인 github
  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
「김동윤」
There is no getter for property named 'password' in 'class com.example.login.vo.UserVO'
상단으로

티스토리툴바