diff --git a/src/main/java/com/loafle/overflow/module/apikey/dao/ApiKeyDAO.java b/src/main/java/com/loafle/overflow/module/apikey/dao/ApiKeyDAO.java index 76fec41..744449f 100644 --- a/src/main/java/com/loafle/overflow/module/apikey/dao/ApiKeyDAO.java +++ b/src/main/java/com/loafle/overflow/module/apikey/dao/ApiKeyDAO.java @@ -11,5 +11,6 @@ import org.springframework.stereotype.Repository; */ @Repository public interface ApiKeyDAO extends JpaRepository { -// Apikeyddd findByApiKey(Apikeyddd apikey); + + ApiKey findByApiKey(String apiKey); } diff --git a/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java b/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java index 4bbe260..ebb1964 100644 --- a/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java +++ b/src/main/java/com/loafle/overflow/module/apikey/model/ApiKey.java @@ -27,7 +27,6 @@ public class ApiKey { this.id = id; } - @Basic @Column(name = "API_KEY", nullable = false, length = 50) public String getApiKey() { return apiKey; @@ -38,7 +37,7 @@ public class ApiKey { } @Temporal(TemporalType.TIMESTAMP) - @Column(name="CREATE_DATE", nullable=false) + @Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) public Date getCreateDate() { return createDate; }