infra arrange

This commit is contained in:
insanity 2017-06-23 15:43:26 +09:00
parent 2611e33327
commit 17e3913581
20 changed files with 138 additions and 14 deletions

View File

@ -0,0 +1,14 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.Infra;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraDAO extends JpaRepository<Infra, Long> {
// @Query("select m from Member m WHERE m.email = :#{#m2.email}")
// Member findByEmail(@Param("m2") Member member);
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraHost;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraHostDAO extends JpaRepository<InfraHost, Long> {
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraMachine;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraMachineDAO extends JpaRepository<InfraMachine, Long> {
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraOSApplication;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraOSApplicationDAO extends JpaRepository<InfraOSApplication, Long> {
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraOS;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraOSDAO extends JpaRepository<InfraOS, Long> {
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraOSDaemon;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraOSDaemonDAO extends JpaRepository<InfraOSDaemon, Long> {
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraOSPort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraOSPortDAO extends JpaRepository<InfraOSPort, Long> {
}

View File

@ -0,0 +1,12 @@
package com.loafle.overflow.module.infra.dao;
import com.loafle.overflow.module.infra.model.InfraService;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* Created by insanity on 17. 6. 23.
*/
@Repository
public interface InfraServiceDAO extends JpaRepository<InfraService, Long> {
}

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import com.loafle.overflow.meta.model.MetaInfraType; import com.loafle.overflow.meta.model.MetaInfraType;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date; import java.util.Date;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import com.loafle.overflow.module.probe.model.Probe; import com.loafle.overflow.module.probe.model.Probe;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import com.loafle.overflow.meta.model.MetaInfraVendor; import com.loafle.overflow.meta.model.MetaInfraVendor;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date; import java.util.Date;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date; import java.util.Date;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import com.loafle.overflow.meta.model.MetaInfraVendor; import com.loafle.overflow.meta.model.MetaInfraVendor;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.module.infra; package com.loafle.overflow.module.infra.model;
import com.loafle.overflow.meta.model.MetaInfraVendor; import com.loafle.overflow.meta.model.MetaInfraVendor;

View File

@ -1,6 +1,6 @@
package com.loafle.overflow.module.target.model; package com.loafle.overflow.module.target.model;
import com.loafle.overflow.module.infra.Infra; import com.loafle.overflow.module.infra.model.Infra;
import com.loafle.overflow.module.probe.model.Probe; import com.loafle.overflow.module.probe.model.Probe;
import javax.persistence.*; import javax.persistence.*;

View File

@ -1,11 +1,11 @@
spring.datasource.url=jdbc:postgresql://192.168.1.106:5432/postgres spring.datasource.url=jdbc:postgresql://192.168.1.106:5432/overflow
spring.datasource.username=vertx spring.datasource.username=overflow
spring.datasource.password=qwe123 spring.datasource.password=qwer5795
spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.database=postgresql spring.jpa.database=postgresql
spring.jpa.hibernate.ddl-auto=create spring.jpa.hibernate.ddl-auto=update
#spring.jpa.hibernate.ddl-auto=update #spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.show-sql=true spring.jpa.show-sql=true

View File

@ -0,0 +1,26 @@
package com.loafle.overflow.infra.dao;
import com.loafle.overflow.AppConfig;
import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.infra.dao.InfraDAO;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
public class JPAInfraDAOTest {
@Autowired
private InfraDAO repo;
@Test
public void create() {
}
}

View File

@ -2,7 +2,7 @@ package com.loafle.overflow.target.dao;
import com.loafle.overflow.AppConfig; import com.loafle.overflow.AppConfig;
import com.loafle.overflow.JdbcConfiguration; import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.infra.Infra; import com.loafle.overflow.module.infra.model.Infra;
import com.loafle.overflow.module.probe.model.Probe; import com.loafle.overflow.module.probe.model.Probe;
import com.loafle.overflow.module.target.dao.TargetDAO; import com.loafle.overflow.module.target.dao.TargetDAO;
import com.loafle.overflow.module.target.model.Target; import com.loafle.overflow.module.target.model.Target;