Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

머지용 #22

Merged
merged 83 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
005d851
feat: ktlint를 위한 editorconfig를 추가합니다
belljun3395 May 17, 2024
4206334
feat: 코트린 관련 의존성 및 플러그인을 추가합니다
belljun3395 May 17, 2024
7e47152
feat: member-api, api-repository, image-store 모듈을 settings.gradle에 추가합니다
belljun3395 May 17, 2024
1f15957
feat: 로컬 환경에 minio 환경을 추가합니다
belljun3395 May 17, 2024
23c1bca
feat: image-store 모듈을 위한 build.gradle을 추가합니다
belljun3395 May 17, 2024
ae7c008
feat: image-store 모듈 구성 설정을 추가합니다
belljun3395 May 17, 2024
b444004
feat: ImageStoreConfig 구현
belljun3395 May 17, 2024
7928188
feat: MinioImageStoreClientConfig 구현
belljun3395 May 17, 2024
e256071
feat: ImageObjectArgs.kt 구현
belljun3395 May 17, 2024
a348154
feat: ImageWriteResponse 구현
belljun3395 May 17, 2024
b90606c
feat: ImageStoreClient 선언
belljun3395 May 17, 2024
c29ae23
feat: MinioImageStoreClient 구현
belljun3395 May 17, 2024
e7d45b2
feat: ImageArgsGenerator 구현
belljun3395 May 17, 2024
c4f7bb1
feat: GetPreSignedImageUrlService 선언
belljun3395 May 17, 2024
b30fc43
feat: RemoveImageService 선언
belljun3395 May 17, 2024
f2c017e
feat: UploadImageService 선언
belljun3395 May 17, 2024
1ef431b
feat: MinioGetPreSignedImageUrlService 구현
belljun3395 May 17, 2024
c64018d
feat: MinioRemoveImageService 선언
belljun3395 May 17, 2024
e6a7793
feat: MinioUploadImageService 구현
belljun3395 May 17, 2024
80ce679
refactor: MemberEntity 생성자를 추가합니다
belljun3395 May 17, 2024
d84f40d
feat: member-api를 위한 build.gradle을 추가합니다
belljun3395 May 17, 2024
89dbf29
feat: member-api 모듈 구성을 추가합니다
belljun3395 May 17, 2024
b62de5d
feat: MemberApiConfig 구현
belljun3395 May 17, 2024
b893eae
feat: social client exception을 구현
belljun3395 May 17, 2024
773910a
feat: social client interceptor 구현
belljun3395 May 17, 2024
190d96f
feat: ClientListener 구현
belljun3395 May 17, 2024
1b85c6b
feat: social client properties 구현
belljun3395 May 17, 2024
817c61b
feat: RestTemplateConfig 구현
belljun3395 May 17, 2024
d7175c0
feat: RetryTemplateConfig 구현
belljun3395 May 17, 2024
953a2b0
feat: HeaderUtils 구현
belljun3395 May 17, 2024
b2ffd07
feat: TokenPropertiesMapper 구현
belljun3395 May 17, 2024
f3757b5
feat: social member client 구현
belljun3395 May 17, 2024
615bc80
feat: social token client 구현
belljun3395 May 17, 2024
016044c
feat: social unlink client 구현
belljun3395 May 17, 2024
db3fa89
feat: KaKoIdTokenParser 구현
belljun3395 May 17, 2024
255322e
feat: SocialMemberServiceDto 구현
belljun3395 May 17, 2024
56e1d17
feat: PostKaKaoMemberService 구현
belljun3395 May 17, 2024
1eb854a
feat: MemberDao 구현
belljun3395 May 17, 2024
030343d
feat: DeleteMemberUseCase 구현
belljun3395 May 17, 2024
df46396
feat: GetMemberDetailUseCase 구현
belljun3395 May 17, 2024
d0bd049
feat: GetMemberTokenDetailUseCase 구현
belljun3395 May 17, 2024
dbe0c74
feat: PostMemberUseCase 구현
belljun3395 May 17, 2024
bbf514a
feat: PatchProfileImageUseCase 구현
belljun3395 May 17, 2024
a78369f
feat: ExistMemberService 구현
belljun3395 May 17, 2024
b68c3f7
refactor: repository 관련 클래스를 api-repository 모듈로 이동합니다
belljun3395 May 17, 2024
d9a0166
feat: implementation project를 수정합니다
belljun3395 May 17, 2024
eeebf2d
feat: ApiConfig 추가
belljun3395 May 17, 2024
cc3a2a7
feat: member-api req, res를 추가합니다
belljun3395 May 17, 2024
7f9b748
feat: MemberController 구현
belljun3395 May 17, 2024
99609c8
refactor: api 구성 설정을 변경합니다
belljun3395 May 17, 2024
9d9dea4
remove: RepositoryTest를 삭제합니다
belljun3395 May 17, 2024
478419e
chore: test 이미지를 추가합니다
belljun3395 May 17, 2024
ab9aaf8
fix: MemberApiConfig 임포트 위치를 수정합니다
belljun3395 May 17, 2024
02d5f5a
fix: patchProfileImageUseCase에 임시 파일을 생성하여 전달 할 수 있도록 수정
belljun3395 May 17, 2024
7334e3b
feat: test를 위한 security 설정을 추가합니다
belljun3395 May 17, 2024
bf459f2
test: MemberControllerTest 추가
belljun3395 May 17, 2024
8bed935
Merge branch 'main' into feat/member-api
belljun3395 May 19, 2024
9d8dddd
rename: KaKaoTokenClient -> KaKaoTokenInfoClient 클래스 명을 수정합니다
belljun3395 May 19, 2024
5c17ecb
fix: KaKaoIdTokenData 파싱이 되지 않던 문제 해결
belljun3395 May 19, 2024
9263c3d
feat: generateKakaoHeaders 추가
belljun3395 May 19, 2024
f46be6c
refactor: usrId로 SocialMemberClient 조회하도록 변경
belljun3395 May 19, 2024
4170b74
refactor: KaKaoMemberData가 profile_image도 받아올 수 있도록 수정
belljun3395 May 19, 2024
4f205a7
refactor: usrId로 SocialMemberClient 조회하도록 변경 KaKaoMemberClient 반영
belljun3395 May 19, 2024
0f3d2fe
refactor: HeaderUtils을 HttpHeaders 확장함수로 변경
belljun3395 May 19, 2024
1b9f0ac
refactor: HeaderUtils을 HttpHeaders 확장함수로 변경 반영
belljun3395 May 19, 2024
bbd1b00
refactor: ImageStoreClient 반환 수정
belljun3395 May 19, 2024
f79b181
refactor: ImageStoreClient 반환 수정 MinioImageStoreClient에 반영
belljun3395 May 19, 2024
c7222b6
refactor: null이 반환되는 경우 예외 발생하도록 수정
belljun3395 May 19, 2024
f15b1e8
refactor: MinioImageStoreClient#removeObject 반환 수정에 따른 구현 수정
belljun3395 May 19, 2024
733990b
refactor: 프로필 이미지 조회에 실패하면 기본 이미지를 대체해서 제공할 수 있도록 수정
belljun3395 May 19, 2024
d80817d
feat: cache starter 의존성 추가
belljun3395 May 19, 2024
540cdac
feat: MemberApiCacheConfig 구현
belljun3395 May 19, 2024
5d44298
feat: member 엔티티 id 기준 캐시 선언
belljun3395 May 19, 2024
5685c9b
feat: MemberApiCacheConfig 구현
belljun3395 May 19, 2024
894e97e
refactor: CacheAbleMemberProfileUpdateDelegator이 member profile 수정하도록…
belljun3395 May 19, 2024
3ea27bd
chore: social client 메서드 주석 추가
belljun3395 May 19, 2024
af465fe
feat: SocialUnlinkClientManager에 의해 관리도기 위한 supports 메서드 추가
belljun3395 May 19, 2024
639b79c
feat: SocialUnlinkClientManager 구현
belljun3395 May 19, 2024
b065270
feat: SocialUnlinkClientManager로 소셜 연결 해지 구현
belljun3395 May 19, 2024
6238abe
feat: S3 이미지 기능을 구현
belljun3395 Jun 4, 2024
038ffbc
refactor: Minio 클래스 프로필 수정
belljun3395 Jun 4, 2024
e0a6009
Merge branch 'main' into feat/s3
belljun3395 Jun 4, 2024
9995d8d
!fix: 충돌을 해결 합니다
Moon-1C Jun 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset=utf-8
end_of_line=lf
indent_style=space
indent_size=4
insert_final_newline=true
disabled_rules=no-wildcard-imports,import-ordering,comment-spacing

[*.{kt,kts}]
insert_final_newline=false
12 changes: 12 additions & 0 deletions api-repository/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bootJar {
enabled = false
}

jar {
enabled = true
}


dependencies {
api project(':data')
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.walking.api.repository.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = ApiRepositoryConfig.BASE_PACKAGE)
public class ApiRepositoryConfig {

public static final String BASE_PACKAGE = "com.walking.api.repository";
public static final String SERVICE_NAME = "walking";
public static final String MODULE_NAME = "api-repository";
public static final String BEAN_NAME_PREFIX = "apiRepository";
public static final String PROPERTY_PREFIX = SERVICE_NAME + "." + MODULE_NAME;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.walking.api.config;
package com.walking.api.repository.config;

import com.walking.data.DataConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import({DataConfig.class})
public class ApiDataConfig {}
public class ApiRepositoryDataConfig {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.walking.api.config;
package com.walking.api.repository.config;

import javax.sql.DataSource;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
Expand All @@ -15,12 +15,12 @@
DataSourceAutoConfiguration.class,
DataSourceTransactionManagerAutoConfiguration.class,
})
public class ApiDataSourceConfig {
public class ApiRepositoryDataSourceConfig {

public static final String DATASOURCE_NAME = ApiAppConfig.BEAN_NAME_PREFIX + "DataSource";
public static final String DATASOURCE_NAME = ApiRepositoryConfig.BEAN_NAME_PREFIX + "DataSource";

@Bean(name = DATASOURCE_NAME)
@ConfigurationProperties(prefix = "spring.datasource")
@ConfigurationProperties(prefix = "api.datasource")
public DataSource dataSource() {
return DataSourceBuilder.create().build();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.walking.api.config;
package com.walking.api.repository.config;

import static com.walking.api.config.ApiDataSourceConfig.DATASOURCE_NAME;
import static com.walking.api.repository.config.ApiRepositoryDataSourceConfig.DATASOURCE_NAME;

import com.walking.data.DataConfig;
import com.walking.data.config.HibernatePropertyMapProvider;
Expand All @@ -17,10 +17,11 @@

@Configuration
@RequiredArgsConstructor
public class ApiEntityConfig {
public class ApiRepositoryEntityConfig {
public static final String ENTITY_MANAGER_FACTORY_NAME =
ApiAppConfig.BEAN_NAME_PREFIX + "EntityManagerFactory";
private static final String PERSIST_UNIT = ApiAppConfig.BEAN_NAME_PREFIX + "PersistenceUnit";
ApiRepositoryConfig.BEAN_NAME_PREFIX + "EntityManagerFactory";
private static final String PERSIST_UNIT =
ApiRepositoryConfig.BEAN_NAME_PREFIX + "PersistenceUnit";

private final HibernatePropertyMapProvider hibernatePropertyMapProvider;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.walking.api.config;
package com.walking.api.repository.config;

import javax.persistence.EntityManagerFactory;
import org.springframework.context.annotation.Bean;
Expand All @@ -13,13 +13,13 @@
@EnableJpaAuditing
@EnableTransactionManagement
@EnableJpaRepositories(
basePackages = ApiAppConfig.BASE_PACKAGE,
transactionManagerRef = ApiJpaConfig.TRANSACTION_MANAGER_NAME,
entityManagerFactoryRef = ApiEntityConfig.ENTITY_MANAGER_FACTORY_NAME)
public class ApiJpaConfig {
basePackages = ApiRepositoryConfig.BASE_PACKAGE,
transactionManagerRef = ApiRepositoryJpaConfig.TRANSACTION_MANAGER_NAME,
entityManagerFactoryRef = ApiRepositoryEntityConfig.ENTITY_MANAGER_FACTORY_NAME)
public class ApiRepositoryJpaConfig {

public static final String TRANSACTION_MANAGER_NAME =
ApiAppConfig.BEAN_NAME_PREFIX + "TransactionalManager";
ApiRepositoryConfig.BEAN_NAME_PREFIX + "TransactionalManager";

@Bean(name = TRANSACTION_MANAGER_NAME)
public PlatformTransactionManager transactionManager(EntityManagerFactory emf) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.walking.api.repository.dao.member;

import com.walking.data.entity.member.MemberEntity;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface MemberRepository extends JpaRepository<MemberEntity, Long> {

boolean existsByIdAndDeletedFalse(Long id);

Optional<MemberEntity> findByIdAndDeletedFalse(Long id);

Optional<MemberEntity> findByCertificationIdAndDeletedFalse(String certificationId);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.walking.api.repository.dao.member;

import com.walking.data.entity.path.PathFavoritesEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface PathFavoritesRepository extends JpaRepository<PathFavoritesEntity, Long> {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.walking.api.repository.traffic;
package com.walking.api.repository.dao.traffic;

import com.walking.data.entity.traffic.TrafficDetailEntity;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.walking.api.repository.traffic;
package com.walking.api.repository.dao.traffic;

import com.walking.data.entity.member.MemberEntity;
import com.walking.data.entity.member.TrafficFavoritesEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.walking.api.repository.traffic;
package com.walking.api.repository.dao.traffic;

import com.walking.data.entity.traffic.TrafficEntity;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api:
datasource:
jdbc-url: ${DB_HOSTNAME}/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api:
datasource:
jdbc-url: jdbc:mysql://localhost:13306/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api:
datasource:
jdbc-url: ${DB_HOSTNAME}/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api:
datasource:
jdbc-url: ${DB_HOSTNAME}/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver
5 changes: 4 additions & 1 deletion api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ dependencyManagement {
}

dependencies {
implementation project(':data')
implementation project(':api-repository')
implementation project(':member-api')

// web
implementation 'org.springframework.boot:spring-boot-starter-web'
Expand Down Expand Up @@ -39,6 +40,8 @@ dependencies {
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: "${jsr305Version}"

implementation 'org.json:json:20200518'


// security
implementation 'org.springframework.boot:spring-boot-starter-security'
Expand Down
3 changes: 3 additions & 0 deletions api/src/main/java/com/walking/api/config/ApiAppConfig.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package com.walking.api.config;

import com.walking.member.api.config.MemberApiConfig;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Import({MemberApiConfig.class})
@Configuration
@ComponentScan(basePackages = ApiAppConfig.BASE_PACKAGE)
public class ApiAppConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walking.api.domain.traffic.usecase;

import com.walking.api.domain.traffic.dto.AddFavoriteTrafficUseCaseRequest;
import com.walking.api.repository.traffic.TrafficFavoritesRepository;
import com.walking.api.repository.dao.traffic.TrafficFavoritesRepository;
import com.walking.data.entity.member.MemberEntity;
import com.walking.data.entity.member.TrafficFavoritesEntity;
import com.walking.data.entity.traffic.TrafficEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import com.walking.api.domain.traffic.dto.BrowseFavoriteTrafficsUseCaseRequest;
import com.walking.api.repository.traffic.TrafficFavoritesRepository;
import com.walking.api.repository.dao.traffic.TrafficFavoritesRepository;
import com.walking.api.web.dto.response.BrowseFavoriteTrafficsResponse;
import com.walking.api.web.dto.response.detail.FavoriteTrafficDetail;
import com.walking.api.web.dto.response.detail.PointDetail;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walking.api.domain.traffic.usecase;

import com.walking.api.domain.traffic.dto.DeleteFavoriteTrafficUseCaseRequest;
import com.walking.api.repository.traffic.TrafficFavoritesRepository;
import com.walking.api.repository.dao.traffic.TrafficFavoritesRepository;
import com.walking.data.entity.member.MemberEntity;
import com.walking.data.entity.member.TrafficFavoritesEntity;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walking.api.domain.traffic.usecase;

import com.walking.api.domain.traffic.dto.UpdateFavoriteTrafficUseCaseRequest;
import com.walking.api.repository.traffic.TrafficFavoritesRepository;
import com.walking.api.repository.dao.traffic.TrafficFavoritesRepository;
import com.walking.data.entity.member.TrafficFavoritesEntity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.walking.api.service;

import com.walking.api.repository.traffic.TrafficDetailRepository;
import com.walking.api.repository.dao.traffic.TrafficDetailRepository;
import com.walking.api.service.dto.ColorAndTimeLeft;
import com.walking.api.service.dto.PredictedData;
import com.walking.api.service.dto.request.CurrentDetailRequestDto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walking.api.service;

import com.walking.api.repository.traffic.TrafficDetailRepository;
import com.walking.api.repository.traffic.TrafficRepository;
import com.walking.api.repository.dao.traffic.TrafficDetailRepository;
import com.walking.api.repository.dao.traffic.TrafficRepository;
import com.walking.api.service.dto.PredictedData;
import com.walking.api.service.dto.request.CyclePredictionRequestDto;
import com.walking.api.util.OffsetDateTimeCalculator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.walking.api.service.path;

import com.walking.api.repository.traffic.TrafficRepository;
import com.walking.api.repository.dao.traffic.TrafficRepository;
import com.walking.api.service.dto.PathTrafficData;
import com.walking.api.util.JsonParser;
import com.walking.data.entity.path.TrafficDirection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walking.api.service.path;

import com.walking.api.repository.dao.member.MemberRepository;
import com.walking.api.repository.dto.response.PathFavoritesVo;
import com.walking.api.repository.member.MemberRepository;
import com.walking.api.repository.path.PathFavoritesRepository;
import com.walking.api.service.dto.response.ReadFavoritesPathResponse;
import com.walking.api.web.dto.request.OrderFilter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.walking.api.service.path;

import com.walking.api.converter.TrafficDetailConverter;
import com.walking.api.repository.traffic.TrafficRepository;
import com.walking.api.repository.dao.traffic.TrafficRepository;
import com.walking.api.service.TrafficIntegrationPredictService;
import com.walking.api.service.dto.PathPrimaryData;
import com.walking.api.service.dto.PathTrafficData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.walking.api.service.traffic;

import com.walking.api.repository.traffic.TrafficFavoritesRepository;
import com.walking.api.repository.dao.traffic.TrafficFavoritesRepository;
import com.walking.data.entity.member.MemberEntity;
import com.walking.data.entity.member.TrafficFavoritesEntity;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.walking.api.service.traffic;

import com.walking.api.repository.traffic.TrafficRepository;
import com.walking.api.repository.dao.traffic.TrafficRepository;
import com.walking.data.entity.traffic.TrafficEntity;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand Down
Loading
Loading