Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/main/java/com/back/domain/user/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;

@Entity
@Table(name = "users") // 예약어 충돌 방지를 위해 "users" 권장
Expand Down Expand Up @@ -70,6 +71,17 @@ public class User {
@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
private List<PostLike> postLikes = new ArrayList<>();

@Override
public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
User user = (User) o;
return Objects.equals(id, user.id);
}

@Override
public int hashCode() {
return Objects.hashCode(id);
}

public boolean isAdmin() {
return "ADMIN".equalsIgnoreCase(role);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/back/global/security/SecurityUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public SecurityUser(
authorities
);


this.id = id;
this.nickname = nickname;
this.email = email;
Expand Down
11 changes: 0 additions & 11 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ spring:
encoding: UTF-8
data-locations: classpath:data-h2.sql

cloud:
aws:
region:
static: ap-northeast-2
stack:
auto: false
credentials:
access-key: ${AWS_ACCESS_KEY_ID} # 로컬용 더미값
secret-key: ${AWS_SECRET_ACCESS_KEY}
s3:
bucket: team2-app-s3-bucket

# Swagger 설정
springdoc:
Expand Down
12 changes: 12 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ spring:
user-info-uri: https://openapi.naver.com/v1/nid/me
user-name-attribute: response

cloud:
aws:
region:
static: ap-northeast-2
stack:
auto: false
credentials:
access-key: ${AWS_ACCESS_KEY_ID} # 로컬용 더미값
secret-key: ${AWS_SECRET_ACCESS_KEY}
s3:
bucket: team2-app-s3-bucket

ai:
openai:
api-key: ${GEMINI_API_KEY}
Expand Down