jpa_sp 패키지 오탈자
This commit is contained in:
parent
ccd34cfa5c
commit
d3154ee717
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.bpgroup.poc.jpa_sp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class ApiResponse<T> {
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
private T result;
|
||||||
|
|
||||||
|
public ApiResponse(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiResponse(Integer code, String message, T result) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ApiResponse Success() {
|
||||||
|
return new ApiResponse(200, "API 요청이 성공했습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ApiResponse Success(Object result) {
|
||||||
|
return new ApiResponse(200, "API 요청이 성공했습니다.", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ApiResponse Fail() {
|
||||||
|
return new ApiResponse(201, "API 요청이 실패했습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ApiResponse Exception() {
|
||||||
|
return new ApiResponse(500, "에러가 발생했습니다.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.bpgorup.poc.jpa_sp;
|
package com.bpgroup.poc.jpa_sp;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package com.bpgorup.poc.jpa_sp.controller;
|
package com.bpgroup.poc.jpa_sp.controller;
|
||||||
|
|
||||||
import com.bpgorup.poc.jpa_sp.ApiResponse;
|
import com.bpgroup.poc.jpa_sp.ApiResponse;
|
||||||
import com.bpgorup.poc.jpa_sp.request.MemberRequest;
|
import com.bpgroup.poc.jpa_sp.request.MemberRequest;
|
||||||
import com.bpgorup.poc.jpa_sp.request.UpdateMemberRequest;
|
import com.bpgroup.poc.jpa_sp.request.UpdateMemberRequest;
|
||||||
import com.bpgorup.poc.jpa_sp.service.MemberService;
|
import com.bpgroup.poc.jpa_sp.service.MemberService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.bpgorup.poc.jpa_sp.entity;
|
package com.bpgroup.poc.jpa_sp.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.bpgorup.poc.jpa_sp.repository;
|
package com.bpgroup.poc.jpa_sp.repository;
|
||||||
|
|
||||||
import com.bpgorup.poc.jpa_sp.entity.MemberEntity;
|
import com.bpgroup.poc.jpa_sp.entity.MemberEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.query.Procedure;
|
import org.springframework.data.jpa.repository.query.Procedure;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.bpgorup.poc.jpa_sp.request;
|
package com.bpgroup.poc.jpa_sp.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.bpgorup.poc.jpa_sp.request;
|
package com.bpgroup.poc.jpa_sp.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.bpgorup.poc.jpa_sp.service;
|
package com.bpgroup.poc.jpa_sp.service;
|
||||||
|
|
||||||
import com.bpgorup.poc.jpa_sp.ApiResponse;
|
import com.bpgroup.poc.jpa_sp.ApiResponse;
|
||||||
import com.bpgorup.poc.jpa_sp.repository.MemberRepository;
|
import com.bpgroup.poc.jpa_sp.repository.MemberRepository;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package jpa_multiple_databases.jpa_multi_db;
|
package jpa_sp_poc.jpa_sp;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
Loading…
Reference in New Issue