From 237e5a8da7a15b82e152ddb9fb50fb1ff4d7516b Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Sep 2023 23:17:45 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20:=20yml=20=EA=B8=B0=EB=B3=B8=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=83=9D=EC=84=B1,=20queryDsl=20ignore=20?= =?UTF-8?q?=ED=95=B4=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 9 ++- build/bootJarMainClassName | 1 + .../bookmark/domain/QBookMarkEntity.java | 41 ++++++++++ .../common/domain/QBaseTimeEntity.java | 39 +++++++++ .../study/domain/QAlarmEntity.java | 51 ++++++++++++ .../study/domain/QStudyEntity.java | 51 ++++++++++++ .../study/domain/QStudyPostEntity.java | 79 +++++++++++++++++++ .../user/domain/QInterestEntity.java | 56 +++++++++++++ .../user/domain/QUserEntity.java | 55 +++++++++++++ .../common/cache/CacheEventLogger.java | 13 --- .../studyhubserver/config/RedisConfig.java | 8 +- src/main/resources/application.yml | 4 + 12 files changed, 388 insertions(+), 19 deletions(-) create mode 100644 build/bootJarMainClassName create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/bookmark/domain/QBookMarkEntity.java create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/common/domain/QBaseTimeEntity.java create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QAlarmEntity.java create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyEntity.java create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyPostEntity.java create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QInterestEntity.java create mode 100644 build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QUserEntity.java delete mode 100644 src/main/java/kr/co/studyhubinu/studyhubserver/common/cache/CacheEventLogger.java create mode 100644 src/main/resources/application.yml diff --git a/.gitignore b/.gitignore index 2eb70cd0..80793052 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,19 @@ HELP.md .gradle -build/ + !gradle/wrapper/gradle-wrapper.jar !**/src/main/**/build/ !**/src/test/**/build/ +build/classes +build/libs +build/resources +build/tmp + !build/libs -*/**/generated/ *.yml +!application.yml !application-prod.yml !deploy.yml diff --git a/build/bootJarMainClassName b/build/bootJarMainClassName new file mode 100644 index 00000000..514a3ab5 --- /dev/null +++ b/build/bootJarMainClassName @@ -0,0 +1 @@ +kr.co.studyhubinu.studyhubserver.StudyHubServerApplication \ No newline at end of file diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/bookmark/domain/QBookMarkEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/bookmark/domain/QBookMarkEntity.java new file mode 100644 index 00000000..fda02eac --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/bookmark/domain/QBookMarkEntity.java @@ -0,0 +1,41 @@ +package kr.co.studyhubinu.studyhubserver.bookmark.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; + + +/** + * QBookMarkEntity is a Querydsl query type for BookMarkEntity + */ +@Generated("com.querydsl.codegen.DefaultEntitySerializer") +public class QBookMarkEntity extends EntityPathBase { + + private static final long serialVersionUID = 1763927877L; + + public static final QBookMarkEntity bookMarkEntity = new QBookMarkEntity("bookMarkEntity"); + + public final NumberPath id = createNumber("id", Long.class); + + public final NumberPath postId = createNumber("postId", Long.class); + + public final NumberPath userId = createNumber("userId", Long.class); + + public QBookMarkEntity(String variable) { + super(BookMarkEntity.class, forVariable(variable)); + } + + public QBookMarkEntity(Path path) { + super(path.getType(), path.getMetadata()); + } + + public QBookMarkEntity(PathMetadata metadata) { + super(BookMarkEntity.class, metadata); + } + +} + diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/common/domain/QBaseTimeEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/common/domain/QBaseTimeEntity.java new file mode 100644 index 00000000..1dfaa201 --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/common/domain/QBaseTimeEntity.java @@ -0,0 +1,39 @@ +package kr.co.studyhubinu.studyhubserver.common.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; + + +/** + * QBaseTimeEntity is a Querydsl query type for BaseTimeEntity + */ +@Generated("com.querydsl.codegen.DefaultSupertypeSerializer") +public class QBaseTimeEntity extends EntityPathBase { + + private static final long serialVersionUID = 507017890L; + + public static final QBaseTimeEntity baseTimeEntity = new QBaseTimeEntity("baseTimeEntity"); + + public final DateTimePath createdDate = createDateTime("createdDate", java.time.LocalDateTime.class); + + public final DateTimePath modifiedDate = createDateTime("modifiedDate", java.time.LocalDateTime.class); + + public QBaseTimeEntity(String variable) { + super(BaseTimeEntity.class, forVariable(variable)); + } + + public QBaseTimeEntity(Path path) { + super(path.getType(), path.getMetadata()); + } + + public QBaseTimeEntity(PathMetadata metadata) { + super(BaseTimeEntity.class, metadata); + } + +} + diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QAlarmEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QAlarmEntity.java new file mode 100644 index 00000000..ab7d6278 --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QAlarmEntity.java @@ -0,0 +1,51 @@ +package kr.co.studyhubinu.studyhubserver.study.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; + + +/** + * QAlarmEntity is a Querydsl query type for AlarmEntity + */ +@Generated("com.querydsl.codegen.DefaultEntitySerializer") +public class QAlarmEntity extends EntityPathBase { + + private static final long serialVersionUID = 873663913L; + + public static final QAlarmEntity alarmEntity = new QAlarmEntity("alarmEntity"); + + public final kr.co.studyhubinu.studyhubserver.common.domain.QBaseTimeEntity _super = new kr.co.studyhubinu.studyhubserver.common.domain.QBaseTimeEntity(this); + + public final EnumPath alarmCategory = createEnum("alarmCategory", kr.co.studyhubinu.studyhubserver.study.enums.AlarmCategoryType.class); + + //inherited + public final DateTimePath createdDate = _super.createdDate; + + public final NumberPath Id = createNumber("Id", Long.class); + + //inherited + public final DateTimePath modifiedDate = _super.modifiedDate; + + public final NumberPath postId = createNumber("postId", Long.class); + + public final StringPath title = createString("title"); + + public QAlarmEntity(String variable) { + super(AlarmEntity.class, forVariable(variable)); + } + + public QAlarmEntity(Path path) { + super(path.getType(), path.getMetadata()); + } + + public QAlarmEntity(PathMetadata metadata) { + super(AlarmEntity.class, metadata); + } + +} + diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyEntity.java new file mode 100644 index 00000000..872ad1c2 --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyEntity.java @@ -0,0 +1,51 @@ +package kr.co.studyhubinu.studyhubserver.study.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; + + +/** + * QStudyEntity is a Querydsl query type for StudyEntity + */ +@Generated("com.querydsl.codegen.DefaultEntitySerializer") +public class QStudyEntity extends EntityPathBase { + + private static final long serialVersionUID = -1337579743L; + + public static final QStudyEntity studyEntity = new QStudyEntity("studyEntity"); + + public final StringPath chatRoomUrl = createString("chatRoomUrl"); + + public final StringPath content = createString("content"); + + public final NumberPath id = createNumber("id", Long.class); + + public final StringPath interest = createString("interest"); + + public final StringPath name = createString("name"); + + public final DatePath studyEndDate = createDate("studyEndDate", java.time.LocalDate.class); + + public final DatePath studyStartDate = createDate("studyStartDate", java.time.LocalDate.class); + + public final NumberPath userId = createNumber("userId", Long.class); + + public QStudyEntity(String variable) { + super(StudyEntity.class, forVariable(variable)); + } + + public QStudyEntity(Path path) { + super(path.getType(), path.getMetadata()); + } + + public QStudyEntity(PathMetadata metadata) { + super(StudyEntity.class, metadata); + } + +} + diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyPostEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyPostEntity.java new file mode 100644 index 00000000..b1d0b71b --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/study/domain/QStudyPostEntity.java @@ -0,0 +1,79 @@ +package kr.co.studyhubinu.studyhubserver.study.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; +import com.querydsl.core.types.dsl.PathInits; + + +/** + * QStudyPostEntity is a Querydsl query type for StudyPostEntity + */ +@Generated("com.querydsl.codegen.DefaultEntitySerializer") +public class QStudyPostEntity extends EntityPathBase { + + private static final long serialVersionUID = -444406559L; + + private static final PathInits INITS = PathInits.DIRECT2; + + public static final QStudyPostEntity studyPostEntity = new QStudyPostEntity("studyPostEntity"); + + public final kr.co.studyhubinu.studyhubserver.common.domain.QBaseTimeEntity _super = new kr.co.studyhubinu.studyhubserver.common.domain.QBaseTimeEntity(this); + + public final StringPath chatUrl = createString("chatUrl"); + + public final StringPath content = createString("content"); + + //inherited + public final DateTimePath createdDate = _super.createdDate; + + public final EnumPath filteredGender = createEnum("filteredGender", kr.co.studyhubinu.studyhubserver.user.enums.GenderType.class); + + public final NumberPath id = createNumber("id", Long.class); + + public final EnumPath major = createEnum("major", kr.co.studyhubinu.studyhubserver.user.enums.MajorType.class); + + //inherited + public final DateTimePath modifiedDate = _super.modifiedDate; + + public final NumberPath penalty = createNumber("penalty", Integer.class); + + public final DatePath studyEndDate = createDate("studyEndDate", java.time.LocalDate.class); + + public final NumberPath studyPerson = createNumber("studyPerson", Integer.class); + + public final DatePath studyStartDate = createDate("studyStartDate", java.time.LocalDate.class); + + public final EnumPath studyWay = createEnum("studyWay", kr.co.studyhubinu.studyhubserver.study.enums.StudyWayType.class); + + public final StringPath title = createString("title"); + + public final kr.co.studyhubinu.studyhubserver.user.domain.QUserEntity user; + + public QStudyPostEntity(String variable) { + this(StudyPostEntity.class, forVariable(variable), INITS); + } + + public QStudyPostEntity(Path path) { + this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); + } + + public QStudyPostEntity(PathMetadata metadata) { + this(metadata, PathInits.getFor(metadata, INITS)); + } + + public QStudyPostEntity(PathMetadata metadata, PathInits inits) { + this(StudyPostEntity.class, metadata, inits); + } + + public QStudyPostEntity(Class type, PathMetadata metadata, PathInits inits) { + super(type, metadata, inits); + this.user = inits.isInitialized("user") ? new kr.co.studyhubinu.studyhubserver.user.domain.QUserEntity(forProperty("user")) : null; + } + +} + diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QInterestEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QInterestEntity.java new file mode 100644 index 00000000..c483110d --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QInterestEntity.java @@ -0,0 +1,56 @@ +package kr.co.studyhubinu.studyhubserver.user.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; +import com.querydsl.core.types.dsl.PathInits; + + +/** + * QInterestEntity is a Querydsl query type for InterestEntity + */ +@Generated("com.querydsl.codegen.DefaultEntitySerializer") +public class QInterestEntity extends EntityPathBase { + + private static final long serialVersionUID = 1730780142L; + + private static final PathInits INITS = PathInits.DIRECT2; + + public static final QInterestEntity interestEntity = new QInterestEntity("interestEntity"); + + public final NumberPath id = createNumber("id", Long.class); + + public final StringPath name = createString("name"); + + public final kr.co.studyhubinu.studyhubserver.study.domain.QStudyPostEntity studyPostEntity; + + public final QUserEntity user; + + public QInterestEntity(String variable) { + this(InterestEntity.class, forVariable(variable), INITS); + } + + public QInterestEntity(Path path) { + this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS)); + } + + public QInterestEntity(PathMetadata metadata) { + this(metadata, PathInits.getFor(metadata, INITS)); + } + + public QInterestEntity(PathMetadata metadata, PathInits inits) { + this(InterestEntity.class, metadata, inits); + } + + public QInterestEntity(Class type, PathMetadata metadata, PathInits inits) { + super(type, metadata, inits); + this.studyPostEntity = inits.isInitialized("studyPostEntity") ? new kr.co.studyhubinu.studyhubserver.study.domain.QStudyPostEntity(forProperty("studyPostEntity"), inits.get("studyPostEntity")) : null; + this.user = inits.isInitialized("user") ? new QUserEntity(forProperty("user")) : null; + } + +} + diff --git a/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QUserEntity.java b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QUserEntity.java new file mode 100644 index 00000000..e9426615 --- /dev/null +++ b/build/generated/querydsl/kr/co/studyhubinu/studyhubserver/user/domain/QUserEntity.java @@ -0,0 +1,55 @@ +package kr.co.studyhubinu.studyhubserver.user.domain; + +import static com.querydsl.core.types.PathMetadataFactory.*; + +import com.querydsl.core.types.dsl.*; + +import com.querydsl.core.types.PathMetadata; +import javax.annotation.processing.Generated; +import com.querydsl.core.types.Path; + + +/** + * QUserEntity is a Querydsl query type for UserEntity + */ +@Generated("com.querydsl.codegen.DefaultEntitySerializer") +public class QUserEntity extends EntityPathBase { + + private static final long serialVersionUID = 228813903L; + + public static final QUserEntity userEntity = new QUserEntity("userEntity"); + + public final kr.co.studyhubinu.studyhubserver.common.domain.QBaseTimeEntity _super = new kr.co.studyhubinu.studyhubserver.common.domain.QBaseTimeEntity(this); + + //inherited + public final DateTimePath createdDate = _super.createdDate; + + public final StringPath email = createString("email"); + + public final EnumPath gender = createEnum("gender", kr.co.studyhubinu.studyhubserver.user.enums.GenderType.class); + + public final NumberPath id = createNumber("id", Long.class); + + public final EnumPath major = createEnum("major", kr.co.studyhubinu.studyhubserver.user.enums.MajorType.class); + + //inherited + public final DateTimePath modifiedDate = _super.modifiedDate; + + public final StringPath nickname = createString("nickname"); + + public final StringPath password = createString("password"); + + public QUserEntity(String variable) { + super(UserEntity.class, forVariable(variable)); + } + + public QUserEntity(Path path) { + super(path.getType(), path.getMetadata()); + } + + public QUserEntity(PathMetadata metadata) { + super(UserEntity.class, metadata); + } + +} + diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/common/cache/CacheEventLogger.java b/src/main/java/kr/co/studyhubinu/studyhubserver/common/cache/CacheEventLogger.java deleted file mode 100644 index cb4896af..00000000 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/common/cache/CacheEventLogger.java +++ /dev/null @@ -1,13 +0,0 @@ -package kr.co.studyhubinu.studyhubserver.common.cache; - -import lombok.extern.slf4j.Slf4j; -import org.ehcache.event.CacheEvent; -import org.ehcache.event.CacheEventListener; - -@Slf4j -public class CacheEventLogger implements CacheEventListener { - public void onEvent(CacheEvent cacheEvent) { - log.info("**************cache event logger message. getKey: {} / getOldValue: {} / getNewValue:{}", - cacheEvent.getKey(), cacheEvent.getOldValue(), cacheEvent.getNewValue()); - } -} \ No newline at end of file diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/config/RedisConfig.java b/src/main/java/kr/co/studyhubinu/studyhubserver/config/RedisConfig.java index af7b5cd2..5801ad3c 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/config/RedisConfig.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/config/RedisConfig.java @@ -3,6 +3,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisStandaloneConfiguration; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; @@ -12,13 +13,12 @@ import org.springframework.data.redis.serializer.StringRedisSerializer; @Configuration +@PropertySource(value = "application-prod.yml") public class RedisConfig { - @Value("${spring.redis.host}") - private String redisHost; + private String redisHost = "studyhub-redis.reoorm.ng.0001.apn2.cache.amazonaws.com"; - @Value("${spring.redis.port}") - private String redisPort; + private String redisPort = "6379"; @Bean public RedisConnectionFactory redisConnectionFactory() { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 00000000..6c914908 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,4 @@ +spring: + profiles: + active: + - prod \ No newline at end of file