-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.1.0
- Loading branch information
Showing
34 changed files
with
976 additions
and
692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 22 additions & 9 deletions
31
main/src/main/java/org/sopt/makers/crew/main/common/config/JpaAuditingConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,34 @@ | ||
package org.sopt.makers.crew.main.common.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Primary; | ||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; | ||
|
||
import com.querydsl.jpa.JPQLTemplates; | ||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
|
||
import jakarta.persistence.EntityManager; | ||
import jakarta.persistence.PersistenceContext; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; | ||
|
||
@EnableJpaAuditing | ||
@Configuration | ||
public class JpaAuditingConfig { | ||
@PersistenceContext | ||
private EntityManager entityManager; | ||
|
||
@Bean | ||
public JPAQueryFactory queryFactory() { | ||
return new JPAQueryFactory(JPQLTemplates.DEFAULT, entityManager); | ||
} | ||
@PersistenceContext(unitName = "primaryEntityManagerFactory") | ||
private EntityManager primaryEntityManager; | ||
|
||
@PersistenceContext(unitName = "secondEntityManagerFactory") | ||
private EntityManager playgroundEntityManager; | ||
|
||
@Bean(name = "primaryQueryFactory") | ||
@Primary | ||
public JPAQueryFactory primaryQueryFactory() { | ||
return new JPAQueryFactory(JPQLTemplates.DEFAULT, primaryEntityManager); | ||
} | ||
|
||
@Bean(name = "playgroundQueryFactory") | ||
public JPAQueryFactory playgroundQueryFactory() { | ||
return new JPAQueryFactory(JPQLTemplates.DEFAULT, playgroundEntityManager); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 14 additions & 11 deletions
25
main/src/main/java/org/sopt/makers/crew/main/common/constant/CrewConst.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
package org.sopt.makers.crew.main.common.constant; | ||
|
||
public abstract class CrewConst { | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* 매 기수 시작하기 전에 수정 필요 | ||
* */ | ||
public static final Integer ACTIVE_GENERATION = 34; | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class CrewConst { | ||
|
||
public static final String DAY_START_TIME = " 00:00:00"; | ||
public static final String DAY_END_TIME = " 23:59:59"; | ||
/** | ||
* 매 기수 시작하기 전에 수정 필요 | ||
* */ | ||
public static final Integer ACTIVE_GENERATION = 35; | ||
|
||
public static final String DAY_FORMAT = "yyyy.MM.dd"; | ||
public static final String DAY_TIME_FORMAT = "yyyy.MM.dd HH:mm:ss"; | ||
public static final String DAY_START_TIME = " 00:00:00"; | ||
public static final String DAY_END_TIME = " 23:59:59"; | ||
|
||
public static final String ORDER_ASC = "asc"; | ||
public static final String ORDER_DESC = "desc"; | ||
public static final String DAY_FORMAT = "yyyy.MM.dd"; | ||
public static final String DAY_TIME_FORMAT = "yyyy.MM.dd HH:mm:ss"; | ||
|
||
public static final String ORDER_ASC = "asc"; | ||
public static final String ORDER_DESC = "desc"; | ||
} |
Oops, something went wrong.