Springboot | version 2.5.2 |
---|---|
java (JDK) | version 11 |
build | Gradle |
database | H2 |
IDE | IntelliJ IDEA |
org.springframework.boot:spring-boot-starter-data-jpa |
---|
org.springframework.boot:spring-boot-starter-validation |
org.springframework.boot:spring-boot-starter-web |
org.projectlombok:lombok |
com.h2database:h2 |
org.springframework.boot:spring-boot-starter-test |
-
κ°λ°μ λ±λ‘νκΈ°
-
POST
-
/create-developer
-
[Request]
{ "developerLevel" : ["NEW", "JUNIOR", "JUNGNIOR", "SENIOR" μ€ 1κ°], "developSkillType" : ["FRONT_END", "BACK_END", "FULL_STACK" μ€ 1κ°], "experienceYears" : 0 ~ 20 μ¬μ΄μ μ μ, "memberId" : 3 ~ 50μλ‘ μ΄λ£¨μ΄μ§ λ¬Έμμ΄, "name" : 3 ~ 20μλ‘ μ΄λ£¨μ΄μ§ λ¬Έμμ΄, "age" : μ΅μ 18μΈ μ μ }
-
[Response]
{ "developerLevel" : [requestλ‘ λ€μ΄μ¨ developerLevel], "developSkillType" : [requestλ‘ λ€μ΄μ¨ developSkillType], "experienceYears" : [requestλ‘ λ€μ΄μ¨ experienceYears], "memberId" : [requestλ‘ λ€μ΄μ¨ memberId] }
-
-
μ¬μ§μ€μΈ λͺ¨λ κ°λ°μ μ 보 κ°μ Έμ€κΈ°
-
GET
-
/developers
-
[Response]
[ { "developerLevel": "κ°λ°μ1μ λ 벨", "developSkillType": "κ°λ°μ1μ κΈ°μ ", "memberId": "κ°λ°μ1 ID" }, { "developerLevel": "κ°λ°μ2μ λ 벨", "developSkillType": "κ°λ°μ2μ κΈ°μ ", "memberId": "κ°λ°μ2 ID" } ]
-
-
νΉμ κ°λ°μ μ 보 κ°μ Έμ€κΈ°
-
GET
-
/developers/{memberId}
-
[Response]
{ "developerLevel": "κ°λ°μμ λ 벨", "developSkillType": "κ°λ°μμ κΈ°μ ", "experienceYears": κ°λ°μ κ²½λ ₯, "stateCode": "κ°λ°μ μ¬μ§ μν", "memberId": "κ°λ°μ Id", "name": "κ°λ°μ μ΄λ¦", "age": κ°λ°μ λμ΄ }
// μμ²ν Idλ₯Ό κ°λ κ°λ°μκ° μμ λ { "errorCode": "NO_DEVELOPER", "errorMessage": "ν΄λΉλλ κ°λ°μκ° μμ΅λλ€." }
-
-
κ°λ°μ μ 보 μμ νκΈ°
-
PUT
-
/developer/{memberId}
-
[Request]
{ "developerLevel" : "μμ νκ³ μ νλ κ°λ°μμ λ 벨", "developSkillType" : "μμ νκ³ μ νλ κ°λ°μμ κΈ°μ ", "experienceYears" : μμ νκ³ μ νλ κ°λ°μμ κ²½λ ₯ }
-
[Response]
{ "developerLevel": "μμ ν κ°λ°μ λ 벨", "developSkillType": "μμ ν κ°λ°μ κΈ°μ ", "experienceYears": μμ ν κ°λ°μ κ²½λ ₯, "stateCode": "κ°λ°μμ μ¬μ§μν", "memberId": "κ°λ°μμ Id", "name": "κ°λ°μμ μ΄λ¦", "age": κ°λ°μμ λμ΄ }
// μμ νκ³ μνλ κ°λ°μκ° μλκ²½μ° { "errorCode": "NO_DEVELOPER", "errorMessage": "ν΄λΉλλ κ°λ°μκ° μμ΅λλ€." }
-
-
κ°λ°μ μμ νκΈ°
-
Delete
-
/developer/{memberId}
-
[Response]
{ "developerLevel": "μμ λ κ°λ°μμ λ 벨", "developSkillType": "μμ λ κ°λ°μμ κΈ°μ ", "experienceYears": μμ λ κ°λ°μμ κ²½λ ₯, "stateCode": "RETIRED", // μμ μ μν΄λ‘ μ²λ¦¬ "memberId": "μμ λ κ°λ°μμ Id", "name": "μμ λ κ°λ°μμ μ΄λ¦", "age": μμ λ κ°λ°μμ λμ΄ }
// μμ νκ³ μνλ κ°λ°μκ° μλκ²½μ° { "errorCode": "NO_DEVELOPER", "errorMessage": "ν΄λΉλλ κ°λ°μκ° μμ΅λλ€." }
-