diff --git a/src/main/java/com/kakaoteck/golagola/config/util/QueryDslConfig.java b/src/main/java/com/kakaoteck/golagola/config/util/QueryDslConfig.java new file mode 100644 index 0000000..26cd3ef --- /dev/null +++ b/src/main/java/com/kakaoteck/golagola/config/util/QueryDslConfig.java @@ -0,0 +1,19 @@ +package com.kakaoteck.golagola.config.util; + +import com.querydsl.jpa.impl.JPAQueryFactory; +import jakarta.persistence.EntityManager; +import lombok.RequiredArgsConstructor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@RequiredArgsConstructor +public class QueryDslConfig { + + private final EntityManager em; + + @Bean + public JPAQueryFactory jpaQueryFactory() { + return new JPAQueryFactory(em); + } +} diff --git a/src/main/java/com/kakaoteck/golagola/domain/seller/entity/Seller.java b/src/main/java/com/kakaoteck/golagola/domain/seller/entity/Seller.java index 217cdc0..8ae5b03 100644 --- a/src/main/java/com/kakaoteck/golagola/domain/seller/entity/Seller.java +++ b/src/main/java/com/kakaoteck/golagola/domain/seller/entity/Seller.java @@ -50,10 +50,10 @@ public class Seller extends BaseEntity implements UserDetails { @Column(nullable = false) private String phoneNum; + @Enumerated(EnumType.STRING) @Column(nullable = false) private Role role; - @Enumerated(EnumType.STRING) @Column(nullable = false) private String realName; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 044a88c..704a5c3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,4 +4,8 @@ spring.datasource.password=8253 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.jpa.hibernate.ddl-auto=update -spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect \ No newline at end of file +spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect + +spring.jwt.secret=YGiByhzi3WNNsx420kl3yrwejJmV8htQ +spring.jwt.token.access-expiration-time=86400000 +spring.jwt.token.refresh-expiration-time=86400000