first commit

This commit is contained in:
snoop 2017-05-31 14:02:44 +09:00
commit 9e0954299a
7 changed files with 199 additions and 0 deletions

29
.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
# Created by .ignore support plugin (hsz.mobi)
### Java template
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.idea/
*.iml
target/

28
pom.xml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.loafle</groupId>
<artifactId>maven_parent_jar</artifactId>
<version>1.0.0-RELEASE</version>
</parent>
<groupId>com.loafle</groupId>
<artifactId>overflow_noauth_agent</artifactId>
<packaging>jar</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>com.loafle.overflow_noauth_agent</name>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.2.10.Final</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,18 @@
package com.loafle.overflow.noauthagent.model;
/**
* Created by root on 17. 5. 31.
*/
public enum AuthType {
ACCEPT("ACT"),
REFUSE("RFE"),
WAIT("WIT");
private String stringValue;
AuthType(String string) {stringValue = string;}
@Override
public String toString() {
return stringValue;
}
}

View File

@ -0,0 +1,93 @@
package com.loafle.overflow.noauthagent.model;
import javax.persistence.*;
import java.util.Date;
/**
* Created by root on 17. 5. 30.
*/
@Entity
@Table(name = "NOAUTH_AGENT")
public class NoAuthAgent {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@Column(name="TEMP_KEY", unique=true, nullable=false)
private String tempKey;
@Temporal(TemporalType.TIMESTAMP)
@Column(name="DATE", nullable=false)
private Date date;
@Column(name="API_KEY", nullable=false)
private String apiKey;
@Column(name="AUTH_STATUS", nullable=false)
@Enumerated(EnumType.STRING)
private AuthType authStatus;
@Column(name="LOCAL_IP", nullable=false)
private long localIP;
@Column(name="HOST_NAME")
private String hostName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTempKey() {
return tempKey;
}
public void setTempKey(String tempKey) {
this.tempKey = tempKey;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public AuthType getAuthStatus() {
return authStatus;
}
public void setAuthStatus(AuthType authStatus) {
this.authStatus = authStatus;
}
public long getLocalIP() {
return localIP;
}
public void setLocalIP(long localIP) {
this.localIP = localIP;
}
public String getHostName() {
return hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
}

0
src/main/resources/_ Normal file
View File

View File

@ -0,0 +1,14 @@
package com.loafle;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
public class AppTest {
@Ignore
@Test
public void testSum() {
fail("Not yet implemented");
}
}

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="3 seconds">
<contextName>overflow_noauth_agent</contextName>
<!-- TRACE > DEBUG > INFO > WARN > ERROR -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n
</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<logger name="com.loafle" level="ALL" />
</configuration>