init
This commit is contained in:
9
template/manager/README.md
Normal file
9
template/manager/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
本模块为 ```通用业务逻辑层```
|
||||
|
||||
```
|
||||
\-- *.mananger(通用业务逻辑层接口定义,以Manager为后缀; package) \-- *.impl(通用业务逻辑层接口实现,以ManagerImpl为后缀; package)
|
||||
\-- *.dto(业务层数据结构; package)
|
||||
\-- *.converter(package)
|
||||
\-- *.facade(remote stub(调用外部rpc); package)
|
||||
\-- *.utils(工具类; package)
|
||||
```
|
||||
28
template/manager/pom.xml
Normal file
28
template/manager/pom.xml
Normal 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>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>{{ .artifactId }}-manager</artifactId>
|
||||
<version>{{ .version }}</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}-persist</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>{{ .groupId }}</groupId>
|
||||
<artifactId>{{ .artifactId }}-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,4 @@
|
||||
存放DTOConverter
|
||||
```
|
||||
\-- *DTOConverter.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放DTO
|
||||
```
|
||||
\-- *DTO.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放RpcServiceAdapter
|
||||
```
|
||||
\-- *RpcServiceAdapter.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放ManagerImpl
|
||||
```
|
||||
\-- *ManagerImpl.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放BaseManagerImpl
|
||||
```
|
||||
\-- *BaseManagerImpl.java
|
||||
```
|
||||
@@ -0,0 +1,4 @@
|
||||
存放工具类
|
||||
```
|
||||
\-- *Util.java
|
||||
```
|
||||
40
template/manager/src/main/resources/hibernate.cfg.xml
Normal file
40
template/manager/src/main/resources/hibernate.cfg.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
~ Hibernate, Relational Persistence for Idiomatic Java
|
||||
~
|
||||
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
-->
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
|
||||
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<hibernate-configuration>
|
||||
|
||||
<session-factory>
|
||||
|
||||
<!-- Database connection settings -->
|
||||
<property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
|
||||
<property name="connection.url">jdbc:mysql://localhost:3306/test</property>
|
||||
<property name="connection.username">root</property>
|
||||
<property name="connection.password">xi@2343JED$</property>
|
||||
|
||||
<!-- JDBC connection pool (use the built-in) -->
|
||||
<property name="connection.pool_size">10</property>
|
||||
|
||||
<!-- SQL dialect -->
|
||||
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
||||
|
||||
<!-- Disable the second-level cache
|
||||
<property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</property>
|
||||
-->
|
||||
|
||||
<!-- Echo all executed SQL to stdout -->
|
||||
<property name="show_sql">true</property>
|
||||
|
||||
<!-- Drop and re-create the database schema on startup
|
||||
<property name="hbm2ddl.auto">create</property>
|
||||
-->
|
||||
</session-factory>
|
||||
|
||||
</hibernate-configuration>
|
||||
Reference in New Issue
Block a user