Skip to content

Commit

Permalink
Merge pull request #139 from ItRecode/develop
Browse files Browse the repository at this point in the history
version 0.1.0 배포
  • Loading branch information
Pull-Stack authored Jan 30, 2023
2 parents 930f0f6 + 81e2322 commit ad975cf
Show file tree
Hide file tree
Showing 43 changed files with 1,843 additions and 41 deletions.
105 changes: 105 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
### 🎁 서비스 소개
![image](https://user-images.githubusercontent.com/64088250/212938313-789d2c14-99fa-460d-86af-34858c5d3f0f.png)
<br>
<br>
![image](https://user-images.githubusercontent.com/64088250/212941454-e4241096-8d67-42e5-8703-acebb5257895.png)

<br>

### 💡레코딧의 KEY Point

```
1️⃣ 내 특별한 일상을 모두와 나눌 수 있어요.
```

```
2️⃣ 나의 모든 일상들을 나만의 공간에 기록하고 오래 보관하고 싶어요.
```

```
3️⃣ 익명으로 모르는 사람들에게도 축하 또는 위로를 받아요.
```
<br>

### ✨누가 필요해요?
![image](https://user-images.githubusercontent.com/64088250/212941594-3c774cfb-dbfd-4e90-be46-e696d34fff4a.png)

<br>

### ❓레코딧은요!
![image](https://user-images.githubusercontent.com/64088250/213171662-58687464-3607-4917-bad1-7c2ff0dfd402.png)

<br>

![image](https://user-images.githubusercontent.com/64088250/213171746-df754669-e41c-44f4-95c0-8beb6498d4aa.png)

<br>

![image](https://user-images.githubusercontent.com/64088250/213171819-8b5e80cf-4d57-4d0b-ba5b-71ff8cfbebab.png)

<br>

![image](https://user-images.githubusercontent.com/64088250/213171846-9f5b0914-2b70-4c58-b8bb-a03c1a9b9b75.png)


<br>

### **👨‍👨‍👧‍👧 팀원**
<table>
<tr>
<td>
<a href="https://github.com/kdomo">
<img src="https://avatars.githubusercontent.com/u/64088250?v=4" width="100px" />
</a>
</td>
<td>
<a href="https://github.com/Jaeyeop-Jung">
<img src="https://avatars.githubusercontent.com/u/65753029?v=4" width="100px" />
</a>
</td>
<td>
<a href="https://github.com/Pull-Stack">
<img src="https://avatars.githubusercontent.com/u/108255447?v=4" width="100px" />
</a>
</td>
</tr>
<tr>
<td align="center"><b><a href="https://github.com/kdomo">김동호</a></b></td>
<td align="center"><b><a href="https://github.com/Jaeyeop-Jung">정재엽</a></b></td>
<td align="center"><b><a href="https://github.com/Pull-Stack">이재원</a></b></td>
</tr>
</table>

<br>

### 🛠 기술스택

<image src="https://user-images.githubusercontent.com/64088250/213172028-e3807721-39f7-4c69-a186-383ee1ee5164.png" witdh="400" height="1200">

<br>

### 🏠 텐져스 문화
#### 1. 호칭은 닉네임으로
- 모든 호칭은 닉네임으로 하며 ‘님’자는 생략해요.
#### 2. 이해하기 쉬운 단어 선택
- 비개발직군도 이해할 수 있게 쉬운 단어로 소통해요.
#### 3. 정리하고 공유하는 습관
- 담당자가 부재 시 다른 팀원들에게 쉬운 handoff를 위해 하루가 끝나기 전에 공유해요.
- 모르는 게 있다면 팀원들에게 자유롭게 질문해요.
- 습득한 지식이나 트러블 슈팅 내용을 기술 블로그에 공유해요.
#### 4. 개발은 혼자 하지 않아요
- PR은 꼭 1명 이상 approve를 받고 merge 해요.
- 코드 리뷰를 할 때는 항상 상대방의 기분을 먼저 생각하면서 자신의 의견을 제시해요.
#### 5. 나의 테스크가 아니라고 외면하지 않기
- 다른 팀원의 테스크라도 팀원이 어려워한다면 먼저 적극적으로 소통하려 하고, 협력해서 문제를 해결해요.
#### 6. 팀워크는 생명
- 회식, 온라인 모각코, 마니또, 마피아 게임 등 다양한 활동을 하며 서로를 알아가요.
#### 7. 애자일한 팀 프로젝트
- JIRA를 활용해 스프린트의 이슈와 일정을 정리해요.
- 매일 오전 9시에 데일리 스크럼을 진행해요.
#### 8. QA 진행
- 매주 금요일 QA를 진행하여 더욱 퀄리티 있는 서비스를 만들어요.
#### 9. 스프린트의 마지막은 KPT 회고로
- 매주 월요일 팀원들이 모두 모여 솔직하게 아쉬운 점, 좋았던 점을 얘기하며 팀을 발전해 나가요.
#### 10. 개인 일정 공유하기
- 스프린트 시작 전 개인 일정을 미리 공유해요.
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'com.recordit'
version = '0.0.1-SNAPSHOT'
version = '0.1.0-SNAPSHOT'
sourceCompatibility = '11'

configurations {
Expand Down Expand Up @@ -55,6 +55,13 @@ dependencies {
// log4j2
implementation 'org.springframework.boot:spring-boot-starter-log4j2'

// actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// prometheus
implementation 'io.micrometer:micrometer-registry-prometheus:latest.release'
testImplementation 'io.micrometer:micrometer-registry-elastic:latest.release'

}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
package com.recordit.server.configuration;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType;
import org.springframework.boot.actuate.endpoint.ExposableEndpoint;
import org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver;
import org.springframework.boot.actuate.endpoint.web.EndpointMapping;
import org.springframework.boot.actuate.endpoint.web.EndpointMediaTypes;
import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint;
import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier;
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.util.StringUtils;

import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
Expand Down Expand Up @@ -29,4 +47,37 @@ private ApiInfo apiInfo() {
.version("1.0")
.build();
}

@Bean
public WebMvcEndpointHandlerMapping webEndpointServletHandlerMapping(
WebEndpointsSupplier webEndpointsSupplier,
ServletEndpointsSupplier servletEndpointsSupplier,
ControllerEndpointsSupplier controllerEndpointsSupplier,
EndpointMediaTypes endpointMediaTypes,
CorsEndpointProperties corsProperties,
WebEndpointProperties webEndpointProperties,
Environment environment
) {
List<ExposableEndpoint<?>> allEndpoints = new ArrayList();
Collection<ExposableWebEndpoint> webEndpoints = webEndpointsSupplier.getEndpoints();
allEndpoints.addAll(webEndpoints);
allEndpoints.addAll(servletEndpointsSupplier.getEndpoints());
allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints());
String basePath = webEndpointProperties.getBasePath();
EndpointMapping endpointMapping = new EndpointMapping(basePath);
boolean shouldRegisterLinksMapping = this.shouldRegisterLinksMapping(webEndpointProperties, environment,
basePath);
return new WebMvcEndpointHandlerMapping(endpointMapping, webEndpoints, endpointMediaTypes,
corsProperties.toCorsConfiguration()
, new EndpointLinksResolver(allEndpoints, basePath), shouldRegisterLinksMapping, null);
}

private boolean shouldRegisterLinksMapping(
WebEndpointProperties webEndpointProperties,
Environment environment,
String basePath
) {
return webEndpointProperties.getDiscovery().isEnabled() && (StringUtils.hasText(basePath)
|| ManagementPortType.get(environment).equals(ManagementPortType.DIFFERENT));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@

import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.recordit.server.dto.comment.CommentRequestDto;
import com.recordit.server.dto.comment.CommentResponseDto;
import com.recordit.server.dto.comment.ModifyCommentRequestDto;
import com.recordit.server.dto.comment.WriteCommentRequestDto;
import com.recordit.server.dto.comment.WriteCommentResponseDto;
import com.recordit.server.exception.ErrorMessage;
Expand Down Expand Up @@ -74,4 +79,51 @@ public ResponseEntity<WriteCommentResponseDto> writeComment(
public ResponseEntity<CommentResponseDto> getComment(@Valid @ModelAttribute CommentRequestDto commentRequestDto) {
return ResponseEntity.ok(commentService.getCommentsBy(commentRequestDto));
}

@ApiOperation(
value = "댓글 삭제",
notes = "댓글을 삭제합니다."
)
@ApiResponses({
@ApiResponse(
code = 200, message = "댓글 삭제 성공"
),
@ApiResponse(
code = 400,
message = "로그인이 안되어있거나, 댓글이 없거나, 로그인 한 사용자와 댓글 작성자가 불일치 한 경우",
response = ErrorMessage.class
)
})
@DeleteMapping("/{commentId}")
public ResponseEntity deleteComment(
@PathVariable("commentId") Long commentId,
@RequestParam Long recordId
) {
commentService.deleteComment(commentId, recordId);
return ResponseEntity.ok().build();
}

@ApiOperation(
value = "댓글 수정",
notes = "댓글을 수정합니다."
)
@ApiResponses({
@ApiResponse(
code = 200, message = "댓글 수정 성공"
),
@ApiResponse(
code = 400,
message = "잘못 된 요청",
response = ErrorMessage.class
)
})
@PutMapping("/{commentId}")
public ResponseEntity modifyComment(
@PathVariable("commentId") Long commentId,
@ApiParam(required = true) @RequestPart(required = true) @Valid ModifyCommentRequestDto modifyCommentRequestDto,
@ApiParam @RequestPart(required = false) MultipartFile attachment
) {
commentService.modifyComment(commentId, modifyCommentRequestDto, attachment);
return ResponseEntity.ok().build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

import java.util.List;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.recordit.server.dto.record.category.RecordCategoryResponseDto;
import com.recordit.server.dto.record.category.SaveRecordCategoryRequestDto;
import com.recordit.server.service.RecordCategoryService;

import io.swagger.annotations.ApiOperation;
Expand Down Expand Up @@ -37,4 +41,11 @@ public ResponseEntity<List<RecordCategoryResponseDto>> getAllRecordCategories()
return ResponseEntity.ok(recordCategoryService.getAllRecordCategories());
}

@PostMapping
public ResponseEntity saveRecordCategories(
@RequestBody SaveRecordCategoryRequestDto saveRecordCategoryRequestDto
) {
recordCategoryService.saveRecordCategory(saveRecordCategoryRequestDto);
return new ResponseEntity(HttpStatus.CREATED);
}
}
Loading

0 comments on commit ad975cf

Please sign in to comment.