Skip to content

Commit

Permalink
fix: 에러 및 builder 경고 해결
Browse files Browse the repository at this point in the history
- Hashtag와 Likes에 @Builder.Default 추가
- Spring과 commons-logging의 충돌을 피하기 위해 commons-logging.jar를 제거
  • Loading branch information
khee2 committed Jul 22, 2024
1 parent d0d75c1 commit b6ea3da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// Spring과 commons-logging의 충돌을 피하기 위해 commons-logging.jar를 제거
implementation('org.springframework.boot:spring-boot-starter') {
exclude group: 'commons-logging', module: 'commons-logging'
}
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class Hashtag {
@Column(name="hashtag_name", nullable = false)
private String name;

@Builder.Default
@OneToMany(mappedBy = "hashtag", fetch = LAZY)
private List<PostHashtag> postHashtags = new ArrayList<>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class Likes {
@JoinColumn(name="member_id", nullable = false)
private Member member;

@Builder.Default
private Boolean isLike = true;

@CreationTimestamp
Expand Down

0 comments on commit b6ea3da

Please sign in to comment.