From a255a026c95b46860c35a61556c866247c3042f4 Mon Sep 17 00:00:00 2001 From: snoop Date: Sun, 4 Jun 2017 15:11:17 +0900 Subject: [PATCH] fixed dao --- pom.xml | 12 ++++++------ .../java/com/loafle/overflow/proxy/db/DBProxy.java | 8 ++++++++ src/main/resources/META-INF/persistence.xml | 3 ++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index ec81ed6..cf37f35 100644 --- a/pom.xml +++ b/pom.xml @@ -63,15 +63,15 @@ 1.9.13 - - com.loafle - overflow_jpa_member_dao - 1.0.0-SNAPSHOT - + + + + + com.loafle - overflow_jpa_agent_dao + overflow_jpa_dao 1.0.0-SNAPSHOT diff --git a/src/main/java/com/loafle/overflow/proxy/db/DBProxy.java b/src/main/java/com/loafle/overflow/proxy/db/DBProxy.java index aa8369b..4ad115b 100644 --- a/src/main/java/com/loafle/overflow/proxy/db/DBProxy.java +++ b/src/main/java/com/loafle/overflow/proxy/db/DBProxy.java @@ -1,12 +1,16 @@ package com.loafle.overflow.proxy.db; + + import com.loafle.overflow.agent.dao.JPAAgentDAO; +import com.loafle.overflow.apikey.dao.JPAApiKeyDao; import com.loafle.overflow.commons.dao.JPABaseDAO; import com.loafle.overflow.db.api.DBGrpc; import com.loafle.overflow.db.api.DBInput; import com.loafle.overflow.db.api.DBOutput; import com.loafle.overflow.member.dao.JPAMemberDAO; +import com.loafle.overflow.noauthagent.dao.JPANoAuthAgentDAO; import io.grpc.ServerBuilder; import org.codehaus.jackson.map.ObjectMapper; @@ -34,9 +38,13 @@ public class DBProxy { daoMap = new ConcurrentHashMap(); JPAMemberDAO memberDao = new JPAMemberDAO(); JPAAgentDAO agentDao = new JPAAgentDAO(); + JPANoAuthAgentDAO jpaNoAuthAgentDAO = new JPANoAuthAgentDAO(); + JPAApiKeyDao jpaApiKeyDao = new JPAApiKeyDao(); daoMap.put("member", memberDao); daoMap.put("agent", agentDao); + daoMap.put("noauthAgent", jpaNoAuthAgentDAO); + daoMap.put("apiKey", jpaApiKeyDao); } public void start(int port) throws IOException { diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 760ae4a..3a4d4b7 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -3,8 +3,9 @@ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> - com.loafle.overflow.member.model.Member + com.loafle.overflow.member.com.loafle.overflow.member.model.Member com.loafle.overflow.agent.model.Agent + com.loafle.overflow.noauthagent.model.NoAuthAgent