Логирование и связь с БД

* Добавли логироание Log4j
* Настроил тестовую взаимосвязь с БД MySQL
This commit is contained in:
Mark Struchkov 2018-12-21 23:14:50 +03:00
parent bdd925071e
commit 71ce7af51d
6 changed files with 107 additions and 0 deletions

18
pom.xml
View File

@ -11,5 +11,23 @@
<artifactId>consultant-core</artifactId>
<properties>
<persistence.ver>1.0.2</persistence.ver>
<lombok.ver>1.18.4</lombok.ver>
</properties>
<dependencies>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>${persistence.ver}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.ver}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,14 @@
package org.sadtech.consultant.dao;
import lombok.Data;
import javax.persistence.Entity;
@Entity
@Data
public class NextStage {
private long id;
private long idNext;
}

View File

@ -0,0 +1,16 @@
package org.sadtech.consultant.dao;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
@Data
public class SaveStage {
@Id
private long id;
private long idStage;
}

View File

@ -0,0 +1,18 @@
package org.sadtech.consultant.dao;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
@Data
@Entity
public class SocialNetworks {
@Id
private long id;
private long idVk;
private long idFacebook;
private long phone;
}

View File

@ -0,0 +1,17 @@
package org.sadtech.consultant.dao;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
@Data
public class Stage {
@Id
private long id;
private String text;
private String wordKeys;
}

View File

@ -0,0 +1,24 @@
package org.sadtech.consultant.dao;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.List;
@Entity
@Data
public class User {
@Id
@GeneratedValue
private long id;
private String name;
private String token;
private String lastName;
private String city;
private List<SocialNetworks> socialNetworks;
}