@EqualsAndHashCode 애너테이션
Equals는 문자열을 비교할 때 많이 사용한다 그렇다면 hashcode는 무엇일까?
hashcode는 문자열과 숫자 특수기호로 이루어진 무작위한 값인줄 알았다. 하지만 여기서 hashcode는 객체 내부의 값만을 나타낸다.
@EqualsAndHashCode애너테이션은
- 객체의 값이 같은지 비교하는 equals()
- 객체내부의 값이 같은지 숫자로 확인하는 hashcode()
위 두가지를 추가해준다.
8080포트가 이용중인 Error
mac
터미널에서 lsof -i tcp:8080을 실행하면 8080포트로 실행중인 프로세스가 아래와 같이 나온다.
해당하는 PID 번호를 sudo kill -9 {PID번호} 해당 명령어로 프로세스 종료시켜준다.