Skip to content

Commit

Permalink
GoalResponse @jsonformat 수정 (#55)
Browse files Browse the repository at this point in the history
* refactor: GoalResponse의 JsonFormat 수정
  • Loading branch information
jemlog authored Aug 25, 2023
1 parent 148423f commit efde1b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
.headers()
.frameOptions().disable()
.and()

.authorizeHttpRequests()

.requestMatchers( "/detail-goals/**","/goals/**","/auth/**").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@


import com.backend.goal.domain.Goal;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;

public record GoalResponse(Long goalId, String title, LocalDate startDate, LocalDate endDate, Long dDay) {
public record GoalResponse(

Long goalId,
String title,

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate startDate,

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate endDate,
Long dDay

) {

public static GoalResponse from(Goal goal, Long dDay)
{
Expand Down

0 comments on commit efde1b9

Please sign in to comment.