Commit c8108f54 by zhouxiao

指掌纹采集后端服务

parents
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
This diff is collapsed. Click to expand it.
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
Manifest-Version: 1.0
Implementation-Title: zzwcjfw
Implementation-Version: 0.0.1.RELEASE
Built-By: founder
Implementation-Vendor-Id: com.zwcj
Created-By: IntelliJ IDEA
Build-Jdk: 1.8.0_31
Main-Class: ${start-class}
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
Manifest-Version: 1.0
Implementation-Title: zzwcjfw
Implementation-Version: 0.0.1-SNAPSHOT
Built-By: founder
Implementation-Vendor-Id: com.zwcj
Created-By: IntelliJ IDEA
Build-Jdk: 1.8.0_31
Main-Class: ${start-class}
#?\u5B9E\u4F53bean\u76EE\u5F55
mybatis.type-aliases-package=com.finger.domain
#?\u6307\u5B9Asql\u6620\u5C04\u6587\u4EF6
mybatis.mapperLocations=classpath:mapper/*.xml
#\u6570\u636E\u6E90\u914D\u7F6E
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://192.168.110.132:3306/gkpt?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverReadOnly=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.druid.test-on-borrow=true
spring.datasource.druid.test-while-idle=true
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<classPathEntry location="F:\idea\zzwcjfw\lib\mysql-connector-java-5.1.20-bin.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="false"/>
</commentGenerator>
<!--数据库连接驱动类,URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.110.131:3306/gkpt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai" userId="root" password="123456">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成(实体)模型的包名和位置-->
<javaModelGenerator targetPackage="com.ocean.pojo" targetProject="src">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 生成XML映射文件的包名和位置-->
<sqlMapGenerator targetPackage="resources.mapping" targetProject="src">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO接口的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.ocean.dao" targetProject="src">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table tableName="userInfo" domainObjectName="UserInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zwcj</groupId>
<artifactId>zwcj</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>zzwcjfw</name>
<description>指纹采集服务</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.3.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!-- provided表明该包只在编译和测试的时候使用,去除默认的tomcat -->
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/json-lib-2.3-jdk15.jar</systemPath>
<exclusions>
<exclusion>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--导入自定义jar包-->
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>0.4.8</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/thumbnailator-0.4.8.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>3.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/commons-lang-2.3.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/commons-beanutils-1.7.0.jar</systemPath>
</dependency>
<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>Morpher</artifactId>
<version>1.0.6</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/ezmorph-1.0.6.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/commons-collections-3.2.jar</systemPath>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/dom4j-1.6.1.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<!-- 配置springboot项目可以后台启动-->
<executable>true</executable>
<!-- 使其system sope生效 -->
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- mybatis generator 自动生成代码插件 -->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.1</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.20</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/mysql-connector-java-8.0.25.jar</systemPath>
</dependency>
</dependencies>
<configuration>
<configurationFile>${basedir}/src/main/resources/generatorConfig.xml</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<!-- 这里是引入外部jar包的配置,本地运行有效 -->
<resource>
<directory>lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/webapp</directory>
<filtering>false</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>spring</id>
<url>https://maven.aliyun.com/repository/spring</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
package com;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* Created by zhouxiao on 2021/3/25.
* 只要是通过外部tomcat启动项目,必须有这个类
* 同时在pom.xml配置中必须有spring-boot-starter-tomcat
*/
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application){
return application.sources(ZzwcjfwApplication.class);
}
}
package com;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableAutoConfiguration
@SpringBootApplication
@MapperScan({"com.mapper.fingerAnalysis"})
public class ZzwcjfwApplication {
public static void main(String[] args) {
SpringApplication.run(ZzwcjfwApplication.class, args);
}
}
package com.common;
import javax.imageio.stream.FileImageOutputStream;
import java.io.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* Created by zhouxiao on 2021/4/19.
*/
public class FileZipUtil {
/**
* @param sourceFilePath 指定文件路径
* @param zipFilePath 打成压缩包的路径
* @param fileName 文件名称
* @return
*/
public static boolean fileToZip(String sourceFilePath,String zipFilePath,String fileName){
boolean flag = false;
File sourceFile = new File(sourceFilePath);
FileInputStream fis = null;
BufferedInputStream bis = null;
FileOutputStream fos = null;
ZipOutputStream zos = null;
if(sourceFile.exists() == false){
System.out.println("待压缩的文件目录:"+sourceFilePath+"不存在.");
}else{
try {
File zipFile = new File(zipFilePath + "/" + fileName +".zip");
if(zipFile.exists()){
System.out.println(zipFilePath + "目录下存在名字为:" + fileName +".zip" +"打包文件.");
}else{
File[] sourceFiles = sourceFile.listFiles();
if(null == sourceFiles || sourceFiles.length<1){
System.out.println("待压缩的文件目录:" + sourceFilePath + "里面不存在文件,无需压缩.");
}else{
fos = new FileOutputStream(zipFile);
zos = new ZipOutputStream(new BufferedOutputStream(fos));
byte[] bufs = new byte[1024*10];
for(int i=0;i<sourceFiles.length;i++){
//创建ZIP实体,并添加进压缩包
ZipEntry zipEntry = new ZipEntry(sourceFiles[i].getName());
zos.putNextEntry(zipEntry);
//读取待压缩的文件并写进压缩包里
fis = new FileInputStream(sourceFiles[i]);
bis = new BufferedInputStream(fis, 1024*10);
int read = 0;
while((read=bis.read(bufs, 0, 1024*10)) != -1){
zos.write(bufs,0,read);
}
}
flag = true;
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
throw new RuntimeException(e);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
} finally{
//关闭流
try {
if(null != bis) bis.close();
if(null != zos) zos.close();
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
}
return flag;
}
//byte数组到图片
public static void byte2image(byte[] data, String path) {
if (data.length < 3 || path.equals("")) return;
try {
FileImageOutputStream imageOutput = new FileImageOutputStream(new File(path));
imageOutput.write(data, 0, data.length);
imageOutput.close();
System.out.println("Make Picture success,Please find image in " + path);
} catch (Exception ex) {
System.out.println("Exception: " + ex);
ex.printStackTrace();
}
}
//byte数组到16进制字符串
public static String byte2string(byte[] data) {
if (data == null || data.length <= 1) return "0x";
if (data.length > 200000) return "0x";
StringBuffer sb = new StringBuffer();
int buf[] = new int[data.length];
//byte数组转化成十进制
for (int k = 0; k < data.length; k++) {
buf[k] = data[k] < 0 ? (data[k] + 256) : (data[k]);
}
//十进制转化成十六进制
for (int k = 0; k < buf.length; k++) {
if (buf[k] < 16) sb.append("0" + Integer.toHexString(buf[k]));
else sb.append(Integer.toHexString(buf[k]));
}
return "0x" + sb.toString().toUpperCase();
}
}
package com.common;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;
/**
* Created by zhouxiao on 2019/5/21.
*/
public class commonDao {
/**
* 链接数据库
* */
public Connection getConn(){
Properties properties = new Properties();
java.io.InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("application.properties");
Connection conn = null;
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
String driverClassName = properties.getProperty("spring.datasource.driver-class-name");
System.out.println("driverClassName===="+driverClassName);
String url = properties.getProperty("spring.datasource.url");
System.out.println("url===="+url);
String username = properties.getProperty("spring.datasource.username");
System.out.println("username===="+username);
String password = properties.getProperty("spring.datasource.password");
System.out.println("password===="+password);
try {
Class.forName(driverClassName).newInstance();
conn= DriverManager.getConnection(url,username,password);
System.out.println("conn===="+conn);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return conn;
}
public static void main(String[] args){
commonDao cmdd = new commonDao();
cmdd.getConn();
}
/**
* 生成不重复随机字符串包括字母数字
* @param len
* @return
*/
public static String generateRandomStr(int len) {
//字符源,可以根据需要删减
String generateSource = "0123456789abcdefghigklmnopqrstuvwxyz";
String rtnStr = "";
for (int i = 0; i < len; i++) {
//循环随机获得当次字符,并移走选出的字符
String nowStr = String.valueOf(generateSource.charAt((int) Math.floor(Math.random() * generateSource.length())));
rtnStr += nowStr;
generateSource = generateSource.replaceAll(nowStr, "");
}
return rtnStr;
}
}
package com.finger.controller;
import com.finger.domain.collectInfoMsg;
import com.finger.domain.descriptiveMsg;
import com.finger.domain.fingerImageMsg;
import com.finger.domain.packageHead;
import com.finger.service.impl.fingerImgService;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* Created by zhouxiao on 2021/7/2.
*/
@Controller
public class fingerImgController {
@Autowired
public fingerImgService fingerImgService;
@RequestMapping("test")
@ResponseBody
public String querytest(){
return "success";
}
@RequestMapping("test1")
@ResponseBody
public String querytest1(){
return "终于成功了";
}
@RequestMapping("saveFingerImg")
@ResponseBody
public String saveFingerImg(HttpServletRequest request){
String str="";
String rybh = request.getParameter("rybh");//拿到被采集人的人员编号
String filename = request.getParameter("filename");//拿到图片的文件名
if(!"".equals(rybh) && rybh != null){
//人员编号不为空,则将图片存储
String[] filenames = filename.split(",");
String rollimgstr = request.getParameter("rollimgstr");
String plaimimgstr = request.getParameter("plaimimgstr");
if(!"".equals(rollimgstr) && rollimgstr != null && !"null".equals(rollimgstr)) {
fingerImgService.GenerateImage(rybh, filenames[0], rollimgstr);
str = "滚动图片"+filenames[0]+"保存成功!";
}
if(!"".equals(plaimimgstr) && plaimimgstr != null && !"null".equals(plaimimgstr)) {
fingerImgService.GenerateImage(rybh, filenames[1], plaimimgstr);
str = "平面图片"+filenames[1]+"保存成功!";
}
}else{
str = "-1";
}
return str;
}
@RequestMapping("saveImgXmlFile")
@ResponseBody
public String saveImgXmlFile(HttpServletRequest request){
String str = "";
String rybh = request.getParameter("rybh");//拿到被采集人的人员编号
if(!"".equals(rybh) && rybh != null) {
//生成xml文件
//包头
packageHead pkghdobj = new packageHead();
Object[] pkghdos = getpackageHeadData(pkghdobj);
//描述
descriptiveMsg descriptiveMsgobj = new descriptiveMsg();
Object[] descriptiveMsgos = getdescriptiveMsgData(rybh, descriptiveMsgobj);
//collect
collectInfoMsg collectInfoMsgobj = new collectInfoMsg();
Object[] collectInfoMsgos = getcollectInfoMsgobj(collectInfoMsgobj);
//指纹-通过指定目录拿到文件名和文件流对应的list
List<Map<String, String>> list = fingerImgService.getFilepath2IoStr(rybh);
fingerImageMsg fmsg = new fingerImageMsg();
Object[] os = getFingerImgData(list);
String xmlStr = fingerImgService.getParamXml(pkghdobj, pkghdos, descriptiveMsgobj, descriptiveMsgos, collectInfoMsgobj, collectInfoMsgos, fmsg, os);
fingerImgService.createXmlFile(rybh, xmlStr);
//fingerImgService.fileToZip(rybh);
str="生成xml格式的fptx文件成功!";
}else{
str = "-1";
}
return str;
}
/**
* 生成包头标签数据
* @param pkghdobj
* @return
*/
public Object[] getpackageHeadData(packageHead pkghdobj){
DateFormat format1 = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
List listos = new ArrayList<>();
pkghdobj.setVersion("FPT0500");
Date date = new Date();
pkghdobj.setCreateTime(format1.format(date));
pkghdobj.setOriginSystem("XZ");
pkghdobj.setFsdw_gajgjgdm("610000000000");
pkghdobj.setFsdw_gajgmc("陕西省公安厅");
pkghdobj.setFsdw_xtlx("2900");
pkghdobj.setFsr_xm("陕西省厅");
pkghdobj.setFsr_gmsfhm("140123198510240018");
pkghdobj.setFsr_lxdh("13363514840");
listos.add(pkghdobj);
System.out.println("listos==="+listos);
Object[] os = JSONArray.fromObject(listos).toArray();
System.out.println("os==="+os);
return os;
}
/**
* 生成desc描述标签数据
* @param rybh
* @param descriptiveMsgobj
* @return
*/
public Object[] getdescriptiveMsgData(String rybh,descriptiveMsg descriptiveMsgobj){
List listos = new ArrayList<>();
//这里数据量太大,是否能从数据库直接查数据
descriptiveMsgobj.setAsjxgrybh(rybh);
descriptiveMsgobj.setYsxt_asjxgrybh(rybh);
descriptiveMsgobj.setJzrybh(rybh);
descriptiveMsgobj.setZzhwkbh(rybh);
descriptiveMsgobj.setCyzjdm("111");
descriptiveMsgobj.setZjhm("142603198412273736");
descriptiveMsgobj.setXzz_xzqhdm("140926");
descriptiveMsgobj.setXzz_dzmc("娘子神乡曹峪村金能煤业");
descriptiveMsgobj.setXm("李鹏鹏");
descriptiveMsgobj.setBmch("李鹏");
descriptiveMsgobj.setXbdm("1");
descriptiveMsgobj.setMzdm("01");
descriptiveMsgobj.setGjdm("156");
descriptiveMsgobj.setHjdz_xzqhdm("141082");
descriptiveMsgobj.setHjdz_dzmc("辛置镇南下庄自建房");
descriptiveMsgobj.setCsrq("19841227");
descriptiveMsgobj.setBz("测试");
listos.add(descriptiveMsgobj);
Object[] os = JSONArray.fromObject(listos).toArray();
return os;
}
/**
* 生成collect标签数据
* @param collectInfoMsgobj
* @return
*/
public Object[] getcollectInfoMsgobj(collectInfoMsg collectInfoMsgobj){
List listos = new ArrayList<>();
collectInfoMsgobj.setZwbdxtlxms("2900");
collectInfoMsgobj.setNydw_gajgjgdm("140926000000");
collectInfoMsgobj.setNydw_gajgmc("静乐县公安局");
collectInfoMsgobj.setNyry_xm("李志宏");
collectInfoMsgobj.setNyry_gmsfhm("140123198510240018");
collectInfoMsgobj.setNyry_lxdh("13363514840");
collectInfoMsgobj.setNysj("20210318000000");
listos.add(collectInfoMsgobj);
Object[] os = JSONArray.fromObject(listos).toArray();
return os;
}
/**
* 生成指纹标签所需的参数
* @param list
* @return
*/
public Object[] getFingerImgData(List<Map<String,String>> list){
List listos = new ArrayList<>();
for(Map map:list){
fingerImageMsg fmsg = new fingerImageMsg();
for(Object key : map.keySet()){
String keystr = key.toString();
String zw = keystr.substring(keystr.lastIndexOf("\\")+1,keystr.lastIndexOf("."));
if(zw.length()<2){
zw = "0"+zw;
}
fmsg.setZwzwdm(zw);
fmsg.setZw_txsj(map.get(key).toString());
}
listos.add(fmsg);
}
Object[] os = JSONArray.fromObject(listos).toArray();
return os;
}
}
package com.finger.controller;
import com.common.buildFingerUtil;
import com.finger.service.impl.fingerInfoAnalyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by zhouxiao on 2021/6/28.
*/
@Controller
public class fingerInfoAnalysis {
@Autowired
public fingerInfoAnalyService fingerAnalyService;
@RequestMapping("queryfingerImg")
@ResponseBody
public List<Map<String,String>> queryFingerImgInfo(HttpServletRequest request) throws Exception {
System.out.println("进来了没??");
List<Map<String,String>> list = new ArrayList<Map<String,String>>();
String path = request.getParameter("Imgpath");
System.out.println("进来了没??");
//String path = Imgpath;
String basepath = fingerAnalyService.getCommonUrl();
System.out.println("进来了没??basepath=="+basepath);
List listname = buildFingerUtil.readfile(basepath+"/"+path);
System.out.println("listname===="+listname);
for(int i=0;i<listname.size();i++){
String filename = listname.get(i).toString();
System.out.println("filename==="+filename);
File file = new File(basepath+"/"+path+"/"+filename);
String str = buildFingerUtil.encodeBase64File(file);
Map map = new HashMap<>();
map.put(filename,str);
list.add(map);
}
return list;
}
@RequestMapping("test2")
@ResponseBody
public String querytest2(){
return "shazhishazhi";
}
}
package com.finger.dao;
import com.common.commonDao;
import org.springframework.stereotype.Repository;
/**
* Created by founder on 2021/7/8.
*/
@Repository
public class fingerconfigDao extends commonDao {
}
package com.finger.domain;
import org.springframework.stereotype.Component;
/**
* Created by zhouxiao on 2021/3/26.
*/
@Component
public class collectInfoMsg {
public String zwbdxtlxms;//指纹比对系统描述
public String nydw_gajgjgdm;//捺印单位_公安机关机构代码
public String nydw_gajgmc;//捺印单位_公安机关名称
public String nyry_xm;//捺印人员_姓名
public String nyry_gmsfhm;//捺印人员_公民身份号码
public String nyry_lxdh;//捺印人员_联系电话
public String nysj;//捺印时间
public String getZwbdxtlxms() {
return zwbdxtlxms;
}
public void setZwbdxtlxms(String zwbdxtlxms) {
this.zwbdxtlxms = zwbdxtlxms;
}
public String getNydw_gajgjgdm() {
return nydw_gajgjgdm;
}
public void setNydw_gajgjgdm(String nydw_gajgjgdm) {
this.nydw_gajgjgdm = nydw_gajgjgdm;
}
public String getNydw_gajgmc() {
return nydw_gajgmc;
}
public void setNydw_gajgmc(String nydw_gajgmc) {
this.nydw_gajgmc = nydw_gajgmc;
}
public String getNyry_xm() {
return nyry_xm;
}
public void setNyry_xm(String nyry_xm) {
this.nyry_xm = nyry_xm;
}
public String getNyry_gmsfhm() {
return nyry_gmsfhm;
}
public void setNyry_gmsfhm(String nyry_gmsfhm) {
this.nyry_gmsfhm = nyry_gmsfhm;
}
public String getNyry_lxdh() {
return nyry_lxdh;
}
public void setNyry_lxdh(String nyry_lxdh) {
this.nyry_lxdh = nyry_lxdh;
}
public String getNysj() {
return nysj;
}
public void setNysj(String nysj) {
this.nysj = nysj;
}
}
package com.finger.domain;
import org.springframework.stereotype.Component;
/**
* Created by zhouxiao on 2021/3/26.
*/
@Component
public class descriptiveMsg {
public String ysxt_asjxgrybh;//原始系统_案事件相关人员编号
public String jzrybh;//警综人员编号
public String asjxgrybh;//案事件相关人员编号
public String zzhwkbh;//指掌纹卡编号
public String hjdz_xzqhdm;//户籍地址_行政区划代码
public String hjdz_dzmc;//户籍地址_地址名称
public String xzz_xzqhdm;//现住址_行政区划代码
public String xzz_dzmc;//现住址_地址名称
public String xm;//姓名
public String bmch;//别名/绰号
public String xbdm;//性别代码
public String csrq;//出生日期
public String gjdm;//国籍代码
public String mzdm;//民族代码
public String cyzjdm;//常用证件代码
public String zjhm;//证件号码
public String bz;//备注
public String getYsxt_asjxgrybh() {
return ysxt_asjxgrybh;
}
public void setYsxt_asjxgrybh(String ysxt_asjxgrybh) {
this.ysxt_asjxgrybh = ysxt_asjxgrybh;
}
public String getAsjxgrybh() {
return asjxgrybh;
}
public void setAsjxgrybh(String asjxgrybh) {
this.asjxgrybh = asjxgrybh;
}
public String getZzhwkbh() {
return zzhwkbh;
}
public void setZzhwkbh(String zzhwkbh) {
this.zzhwkbh = zzhwkbh;
}
public String getXm() {
return xm;
}
public void setXm(String xm) {
this.xm = xm;
}
public String getXbdm() {
return xbdm;
}
public void setXbdm(String xbdm) {
this.xbdm = xbdm;
}
public String getCsrq() {
return csrq;
}
public void setCsrq(String csrq) {
this.csrq = csrq;
}
public String getMzdm() {
return mzdm;
}
public void setMzdm(String mzdm) {
this.mzdm = mzdm;
}
public String getCyzjdm() {
return cyzjdm;
}
public void setCyzjdm(String cyzjdm) {
this.cyzjdm = cyzjdm;
}
public String getZjhm() {
return zjhm;
}
public void setZjhm(String zjhm) {
this.zjhm = zjhm;
}
public String getHjdz_xzqhdm() {
return hjdz_xzqhdm;
}
public void setHjdz_xzqhdm(String hjdz_xzqhdm) {
this.hjdz_xzqhdm = hjdz_xzqhdm;
}
public String getHjdz_dzmc() {
return hjdz_dzmc;
}
public void setHjdz_dzmc(String hjdz_dzmc) {
this.hjdz_dzmc = hjdz_dzmc;
}
public String getXzz_xzqhdm() {
return xzz_xzqhdm;
}
public void setXzz_xzqhdm(String xzz_xzqhdm) {
this.xzz_xzqhdm = xzz_xzqhdm;
}
public String getXzz_dzmc() {
return xzz_dzmc;
}
public void setXzz_dzmc(String xzz_dzmc) {
this.xzz_dzmc = xzz_dzmc;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
public String getJzrybh() {
return jzrybh;
}
public void setJzrybh(String jzrybh) {
this.jzrybh = jzrybh;
}
public String getBmch() {
return bmch;
}
public void setBmch(String bmch) {
this.bmch = bmch;
}
public String getGjdm() {
return gjdm;
}
public void setGjdm(String gjdm) {
this.gjdm = gjdm;
}
}
package com.finger.domain;
import org.springframework.stereotype.Component;
/**
* Created by zhouxiao on 2021/3/25.
*/
@Component
public class fingerImageMsg {
public String zwzwdm;
public String zzhwtztqfsdm;
public String zzhwqsqkdm;
public String zwwxzfl_zwwxdm;
public String zwwxffl_zwwxdm;
public String zwfx_tzfx;
public String zwfx_tzfxfw;
public String zwzxd_tzxzb;
public String zwzxd_tzyzb;
public String zwzxd_tzzbfw;
public String zwzxd_tzfx;
public String zwzxd_tzfxfw;
public String zwzxd_tzkkd;
public String zwfzx_tzxzb;
public String zwfzx_tzyzb;
public String zwfzx_tzzbfw;
public String zwfzx_tzfx;
public String zwfzx_tzfxfw;
public String zwfzx_tzkkd;
public String zwzsj_tzxzb;
public String zwzsj_tzyzb;
public String zwzsj_tzzbfw;
public String zwzsj_tzfx;
public String zwzsj_tzfxfw;
public String zwzsj_tzkkd;
public String zwysj_tzxzb;
public String zwysj_tzyzb;
public String zwysj_tzzbfw;
public String zwysj_tzfx;
public String zwysj_tzfxfw;
public String zwysj_tzkkd;
public String minutiaSet;
public String zw_zdyxx;
public String zw_txspfxcd;
public String zw_txczfxcd;
public String zw_txfbl;
public String zw_txysffms;
public String zw_txzl;
public String zw_txsj;
public String getZwzwdm() {
return zwzwdm;
}
public void setZwzwdm(String zwzwdm) {
this.zwzwdm = zwzwdm;
}
public String getZw_txsj() {
return zw_txsj;
}
public void setZw_txsj(String zw_txsj) {
this.zw_txsj = zw_txsj;
}
public String getZzhwtztqfsdm() {
return zzhwtztqfsdm;
}
public void setZzhwtztqfsdm(String zzhwtztqfsdm) {
this.zzhwtztqfsdm = zzhwtztqfsdm;
}
public String getZzhwqsqkdm() {
return zzhwqsqkdm;
}
public void setZzhwqsqkdm(String zzhwqsqkdm) {
this.zzhwqsqkdm = zzhwqsqkdm;
}
public String getZwwxzfl_zwwxdm() {
return zwwxzfl_zwwxdm;
}
public void setZwwxzfl_zwwxdm(String zwwxzfl_zwwxdm) {
this.zwwxzfl_zwwxdm = zwwxzfl_zwwxdm;
}
public String getZwwxffl_zwwxdm() {
return zwwxffl_zwwxdm;
}
public void setZwwxffl_zwwxdm(String zwwxffl_zwwxdm) {
this.zwwxffl_zwwxdm = zwwxffl_zwwxdm;
}
public String getZwfx_tzfx() {
return zwfx_tzfx;
}
public void setZwfx_tzfx(String zwfx_tzfx) {
this.zwfx_tzfx = zwfx_tzfx;
}
public String getZwfx_tzfxfw() {
return zwfx_tzfxfw;
}
public void setZwfx_tzfxfw(String zwfx_tzfxfw) {
this.zwfx_tzfxfw = zwfx_tzfxfw;
}
public String getZwzxd_tzxzb() {
return zwzxd_tzxzb;
}
public void setZwzxd_tzxzb(String zwzxd_tzxzb) {
this.zwzxd_tzxzb = zwzxd_tzxzb;
}
public String getZwzxd_tzyzb() {
return zwzxd_tzyzb;
}
public void setZwzxd_tzyzb(String zwzxd_tzyzb) {
this.zwzxd_tzyzb = zwzxd_tzyzb;
}
public String getZwzxd_tzzbfw() {
return zwzxd_tzzbfw;
}
public void setZwzxd_tzzbfw(String zwzxd_tzzbfw) {
this.zwzxd_tzzbfw = zwzxd_tzzbfw;
}
public String getZwzxd_tzfx() {
return zwzxd_tzfx;
}
public void setZwzxd_tzfx(String zwzxd_tzfx) {
this.zwzxd_tzfx = zwzxd_tzfx;
}
public String getZwzxd_tzfxfw() {
return zwzxd_tzfxfw;
}
public void setZwzxd_tzfxfw(String zwzxd_tzfxfw) {
this.zwzxd_tzfxfw = zwzxd_tzfxfw;
}
public String getZwzxd_tzkkd() {
return zwzxd_tzkkd;
}
public void setZwzxd_tzkkd(String zwzxd_tzkkd) {
this.zwzxd_tzkkd = zwzxd_tzkkd;
}
public String getZwfzx_tzxzb() {
return zwfzx_tzxzb;
}
public void setZwfzx_tzxzb(String zwfzx_tzxzb) {
this.zwfzx_tzxzb = zwfzx_tzxzb;
}
public String getZwfzx_tzyzb() {
return zwfzx_tzyzb;
}
public void setZwfzx_tzyzb(String zwfzx_tzyzb) {
this.zwfzx_tzyzb = zwfzx_tzyzb;
}
public String getZwfzx_tzzbfw() {
return zwfzx_tzzbfw;
}
public void setZwfzx_tzzbfw(String zwfzx_tzzbfw) {
this.zwfzx_tzzbfw = zwfzx_tzzbfw;
}
public String getZwfzx_tzfx() {
return zwfzx_tzfx;
}
public void setZwfzx_tzfx(String zwfzx_tzfx) {
this.zwfzx_tzfx = zwfzx_tzfx;
}
public String getZwfzx_tzfxfw() {
return zwfzx_tzfxfw;
}
public void setZwfzx_tzfxfw(String zwfzx_tzfxfw) {
this.zwfzx_tzfxfw = zwfzx_tzfxfw;
}
public String getZwfzx_tzkkd() {
return zwfzx_tzkkd;
}
public void setZwfzx_tzkkd(String zwfzx_tzkkd) {
this.zwfzx_tzkkd = zwfzx_tzkkd;
}
public String getZwzsj_tzxzb() {
return zwzsj_tzxzb;
}
public void setZwzsj_tzxzb(String zwzsj_tzxzb) {
this.zwzsj_tzxzb = zwzsj_tzxzb;
}
public String getZwzsj_tzyzb() {
return zwzsj_tzyzb;
}
public void setZwzsj_tzyzb(String zwzsj_tzyzb) {
this.zwzsj_tzyzb = zwzsj_tzyzb;
}
public String getZwzsj_tzzbfw() {
return zwzsj_tzzbfw;
}
public void setZwzsj_tzzbfw(String zwzsj_tzzbfw) {
this.zwzsj_tzzbfw = zwzsj_tzzbfw;
}
public String getZwzsj_tzfx() {
return zwzsj_tzfx;
}
public void setZwzsj_tzfx(String zwzsj_tzfx) {
this.zwzsj_tzfx = zwzsj_tzfx;
}
public String getZwzsj_tzfxfw() {
return zwzsj_tzfxfw;
}
public void setZwzsj_tzfxfw(String zwzsj_tzfxfw) {
this.zwzsj_tzfxfw = zwzsj_tzfxfw;
}
public String getZwzsj_tzkkd() {
return zwzsj_tzkkd;
}
public void setZwzsj_tzkkd(String zwzsj_tzkkd) {
this.zwzsj_tzkkd = zwzsj_tzkkd;
}
public String getZwysj_tzxzb() {
return zwysj_tzxzb;
}
public void setZwysj_tzxzb(String zwysj_tzxzb) {
this.zwysj_tzxzb = zwysj_tzxzb;
}
public String getZwysj_tzyzb() {
return zwysj_tzyzb;
}
public void setZwysj_tzyzb(String zwysj_tzyzb) {
this.zwysj_tzyzb = zwysj_tzyzb;
}
public String getZwysj_tzzbfw() {
return zwysj_tzzbfw;
}
public void setZwysj_tzzbfw(String zwysj_tzzbfw) {
this.zwysj_tzzbfw = zwysj_tzzbfw;
}
public String getZwysj_tzfx() {
return zwysj_tzfx;
}
public void setZwysj_tzfx(String zwysj_tzfx) {
this.zwysj_tzfx = zwysj_tzfx;
}
public String getZwysj_tzfxfw() {
return zwysj_tzfxfw;
}
public void setZwysj_tzfxfw(String zwysj_tzfxfw) {
this.zwysj_tzfxfw = zwysj_tzfxfw;
}
public String getZwysj_tzkkd() {
return zwysj_tzkkd;
}
public void setZwysj_tzkkd(String zwysj_tzkkd) {
this.zwysj_tzkkd = zwysj_tzkkd;
}
public String getMinutiaSet() {
return minutiaSet;
}
public void setMinutiaSet(String minutiaSet) {
this.minutiaSet = minutiaSet;
}
public String getZw_zdyxx() {
return zw_zdyxx;
}
public void setZw_zdyxx(String zw_zdyxx) {
this.zw_zdyxx = zw_zdyxx;
}
public String getZw_txspfxcd() {
return zw_txspfxcd;
}
public void setZw_txspfxcd(String zw_txspfxcd) {
this.zw_txspfxcd = zw_txspfxcd;
}
public String getZw_txczfxcd() {
return zw_txczfxcd;
}
public void setZw_txczfxcd(String zw_txczfxcd) {
this.zw_txczfxcd = zw_txczfxcd;
}
public String getZw_txfbl() {
return zw_txfbl;
}
public void setZw_txfbl(String zw_txfbl) {
this.zw_txfbl = zw_txfbl;
}
public String getZw_txysffms() {
return zw_txysffms;
}
public void setZw_txysffms(String zw_txysffms) {
this.zw_txysffms = zw_txysffms;
}
public String getZw_txzl() {
return zw_txzl;
}
public void setZw_txzl(String zw_txzl) {
this.zw_txzl = zw_txzl;
}
}
package com.finger.domain;
import org.springframework.stereotype.Component;
/**
* Created by zhouxiao on 2021/7/7.
*/
@Component
public class fingerconfig {
public String cjfs; //采集方式
public String tpgs; //图片格式
public String cclj; //存储路径
public String xxzjbh; //信息主键编号
public String sfzctxzw; //是否支持判断图像为指纹
public String sfzczwzl; //是否支持判断指纹质量
public String dqjkbb; //当前接口版本
public String cjqswz; //采集起始位置
public String cjtxdx; //采集图像大小
public String txzdz; //图像最大值
public String sbxlh; //设备序列号
public String sbjksm; //设备接口说明
public String sfzqpjzwtx; //是否支持增强拼接指纹图像
public String sfzygdcj; //是否支持左右滚动采集
public String sfsxgdcj; //是否支持上下滚动采集
public String bbjk; //接口版本
public String jksm; //接口说明
public String sytdh; //使用的通道号
public String zwhgfs; //指纹合格分数
public String bjtcld; //背景填充亮度
public String txlx; //图像类型
public String mld; //明亮度
public String dbd; //对比度
public String gdzwjxyz; //滚动指纹交叉验证
public String gdpmtyrz; //滚动平面统一认证
public String zdtqtz; //自动提取特征
public String getCjfs() {
return cjfs;
}
public void setCjfs(String cjfs) {
this.cjfs = cjfs;
}
public String getTpgs() {
return tpgs;
}
public void setTpgs(String tpgs) {
this.tpgs = tpgs;
}
public String getCclj() {
return cclj;
}
public void setCclj(String cclj) {
this.cclj = cclj;
}
public String getXxzjbh() {
return xxzjbh;
}
public void setXxzjbh(String xxzjbh) {
this.xxzjbh = xxzjbh;
}
public String getSfzctxzw() {
return sfzctxzw;
}
public void setSfzctxzw(String sfzctxzw) {
this.sfzctxzw = sfzctxzw;
}
public String getSfzczwzl() {
return sfzczwzl;
}
public void setSfzczwzl(String sfzczwzl) {
this.sfzczwzl = sfzczwzl;
}
public String getCjqswz() {
return cjqswz;
}
public void setCjqswz(String cjqswz) {
this.cjqswz = cjqswz;
}
public String getCjtxdx() {
return cjtxdx;
}
public void setCjtxdx(String cjtxdx) {
this.cjtxdx = cjtxdx;
}
public String getTxzdz() {
return txzdz;
}
public void setTxzdz(String txzdz) {
this.txzdz = txzdz;
}
public String getSbxlh() {
return sbxlh;
}
public void setSbxlh(String sbxlh) {
this.sbxlh = sbxlh;
}
public String getJksm() {
return jksm;
}
public void setJksm(String jksm) {
this.jksm = jksm;
}
public String getSfzqpjzwtx() {
return sfzqpjzwtx;
}
public void setSfzqpjzwtx(String sfzqpjzwtx) {
this.sfzqpjzwtx = sfzqpjzwtx;
}
public String getSfzygdcj() {
return sfzygdcj;
}
public void setSfzygdcj(String sfzygdcj) {
this.sfzygdcj = sfzygdcj;
}
public String getSfsxgdcj() {
return sfsxgdcj;
}
public void setSfsxgdcj(String sfsxgdcj) {
this.sfsxgdcj = sfsxgdcj;
}
public String getSytdh() {
return sytdh;
}
public void setSytdh(String sytdh) {
this.sytdh = sytdh;
}
public String getZwhgfs() {
return zwhgfs;
}
public void setZwhgfs(String zwhgfs) {
this.zwhgfs = zwhgfs;
}
public String getBjtcld() {
return bjtcld;
}
public void setBjtcld(String bjtcld) {
this.bjtcld = bjtcld;
}
public String getTxlx() {
return txlx;
}
public void setTxlx(String txlx) {
this.txlx = txlx;
}
public String getMld() {
return mld;
}
public void setMld(String mld) {
this.mld = mld;
}
public String getDbd() {
return dbd;
}
public void setDbd(String dbd) {
this.dbd = dbd;
}
public String getGdzwjxyz() {
return gdzwjxyz;
}
public void setGdzwjxyz(String gdzwjxyz) {
this.gdzwjxyz = gdzwjxyz;
}
public String getGdpmtyrz() {
return gdpmtyrz;
}
public void setGdpmtyrz(String gdpmtyrz) {
this.gdpmtyrz = gdpmtyrz;
}
public String getZdtqtz() {
return zdtqtz;
}
public void setZdtqtz(String zdtqtz) {
this.zdtqtz = zdtqtz;
}
public String getDqjkbb() {
return dqjkbb;
}
public void setDqjkbb(String dqjkbb) {
this.dqjkbb = dqjkbb;
}
public String getSbjksm() {
return sbjksm;
}
public void setSbjksm(String sbjksm) {
this.sbjksm = sbjksm;
}
public String getBbjk() {
return bbjk;
}
public void setBbjk(String bbjk) {
this.bbjk = bbjk;
}
}
package com.finger.domain;
import org.springframework.stereotype.Component;
/**
* Created by zhouxiao on 2021/3/26.
*/
@Component
public class packageHead {
public String version;//版本号
public String createTime;//创建时间
public String originSystem;//来源系统
public String fsdw_gajgjgdm;//发送单位代码
public String fsdw_gajgmc;//发送单位名称
public String fsdw_xtlx;//发送单位系统类型
public String fsr_xm;//发送人姓名
public String fsr_gmsfhm;//发送人身份证号
public String fsr_lxdh;//发送人联系电话
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getOriginSystem() {
return originSystem;
}
public void setOriginSystem(String originSystem) {
this.originSystem = originSystem;
}
public String getFsdw_gajgjgdm() {
return fsdw_gajgjgdm;
}
public void setFsdw_gajgjgdm(String fsdw_gajgjgdm) {
this.fsdw_gajgjgdm = fsdw_gajgjgdm;
}
public String getFsdw_gajgmc() {
return fsdw_gajgmc;
}
public void setFsdw_gajgmc(String fsdw_gajgmc) {
this.fsdw_gajgmc = fsdw_gajgmc;
}
public String getFsdw_xtlx() {
return fsdw_xtlx;
}
public void setFsdw_xtlx(String fsdw_xtlx) {
this.fsdw_xtlx = fsdw_xtlx;
}
public String getFsr_xm() {
return fsr_xm;
}
public void setFsr_xm(String fsr_xm) {
this.fsr_xm = fsr_xm;
}
public String getFsr_gmsfhm() {
return fsr_gmsfhm;
}
public void setFsr_gmsfhm(String fsr_gmsfhm) {
this.fsr_gmsfhm = fsr_gmsfhm;
}
public String getFsr_lxdh() {
return fsr_lxdh;
}
public void setFsr_lxdh(String fsr_lxdh) {
this.fsr_lxdh = fsr_lxdh;
}
}
package com.finger.service;
import com.finger.domain.fingerconfig;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* Created by founder on 2021/7/7.
*/
public interface IfingerConfigService {
List<fingerconfig> queryzwsbInfo(fingerconfig fgcfg);
//1、设置采集设备信息
public Boolean savecjsb(fingerconfig fgcfg);
//查询采集设备信息
public List<fingerconfig> querycjsb(fingerconfig fgcfg);
//修改采集设备信息
public Boolean editcjsb(fingerconfig fgcfg);
//2、设置接口信息表
public Boolean savejkxx(fingerconfig fgcfg);
//查询接口信息
public List<fingerconfig> queryjkxx(fingerconfig fgcfg);
//修改接口信息
public Boolean editjkxx(fingerconfig fgcfg);
//3、设置参数表
public Boolean savecssz(fingerconfig fgcfg);
//查询参数设置信息
public List<fingerconfig> querycssz(fingerconfig fgcfg);
//修改设置参数信息
public Boolean editcssz(fingerconfig fgcfg);
//4、设置指纹检查表
public Boolean savezwjc(fingerconfig fgcfg);
//查询指纹检查信息
public List<fingerconfig> queryzwjc(fingerconfig fgcfg);
//修改指纹检查信息
public Boolean editzwjc(fingerconfig fgcfg);
}
package com.finger.service.impl;
import com.finger.domain.fingerconfig;
import com.finger.service.IfingerConfigService;
import com.mapper.fingerAnalysis.fingerConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* Created by zhouxiao on 2021/7/7.
*/
@Service
public class fingerConfigServiceImpl implements IfingerConfigService{
@Resource
private fingerConfigMapper fingerDao;
@Override
public List<fingerconfig> queryzwsbInfo(fingerconfig fgcfg){
List<fingerconfig> list = fingerDao.queryzwsbInfo(fgcfg);
return list;
}
@Override
public Boolean savecjsb(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.savecjsb(fgcfg);
if(rows > 0){
bool = true;
}
return bool;
}
@Override
public List<fingerconfig> querycjsb(fingerconfig fgcfg) {
List<fingerconfig> list = fingerDao.querycjsb(fgcfg);
return list;
}
@Override
public Boolean editcjsb(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.editcjsb(fgcfg);
if(rows>0){
bool = true;
}
return bool;
}
@Override
public Boolean savejkxx(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.savejkxx(fgcfg);
if(rows > 0){
bool = true;
}
return bool;
}
@Override
public List<fingerconfig> queryjkxx(fingerconfig fgcfg) {
List<fingerconfig> list = fingerDao.queryjkxx(fgcfg);
return list;
}
@Override
public Boolean editjkxx(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.editjkxx(fgcfg);
if(rows>0){
bool = true;
}
return bool;
}
@Override
public Boolean savecssz(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.savecssz(fgcfg);
if(rows > 0){
bool = true;
}
return bool;
}
@Override
public List<fingerconfig> querycssz(fingerconfig fgcfg) {
List<fingerconfig> list = fingerDao.querycssz(fgcfg);
return list;
}
@Override
public Boolean editcssz(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.editcssz(fgcfg);
if(rows>0){
bool = true;
}
return bool;
}
@Override
public Boolean savezwjc(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.savezwjc(fgcfg);
if(rows > 0){
bool = true;
}
return bool;
}
@Override
public List<fingerconfig> queryzwjc(fingerconfig fgcfg) {
List<fingerconfig> list = fingerDao.queryzwjc(fgcfg);
return list;
}
@Override
public Boolean editzwjc(fingerconfig fgcfg) {
Boolean bool = false;
int rows = fingerDao.editzwjc(fgcfg);
if(rows>0){
bool = true;
}
return bool;
}
}
package com.finger.service.impl;
import com.common.FileZipUtil;
import com.common.buildFingerUtil;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.springframework.stereotype.Service;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.*;
/**
* Created by founder on 2021/7/2.
*/
@Service
public class fingerImgService {
/**
* base64字符串转化成图片,并保存到指定位置
* @param rybh
* @param filename 11_plainImage.bmp;1_rolledImage.bmp
* @param imgStr
* @return
*/
public boolean GenerateImage(String rybh,String filename,String imgStr){ //对字节数组字符串进行Base64解码并生成图片
if (imgStr == null) //图像数据为空
return false;
try{
//生成bmp图片
Properties properties = new Properties();
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("founder_zwcj.properties");
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
String basePath = properties.getProperty("path");
String fullPath = basePath + "/" + rybh + "/";
File dir = new File(fullPath);
if(!dir.exists()) {
if(dir.mkdir()) {
System.out.println("创建目录{}成功"+ fullPath);
}
}
File file = new File(fullPath + filename);
if (!file.exists()) {
file.createNewFile();
System.out.println("文件"+fullPath + filename+"创建成功!");
}
String imgFilePath = fullPath + filename;//"D:\\tupian\\new.bmp";新生成的图片
buildFingerUtil.decoderBase64File(imgStr,imgFilePath);
return true;
}catch (Exception e){
return false;
}
}
/**
* 读取指定目录下的指定文件夹中的图片,将文件路径和图片流对应
* @param rybh 指定的文件夹
* @return
* @throws IOException
*/
public List<Map<String,String>> getFilepath2IoStr(String rybh){
List<Map<String,String>> list = new ArrayList<>();
Properties properties = new Properties();
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("founder_zwcj.properties");
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
String basePath = properties.getProperty("path");//读取图片路径
//这里开始处理文件,取的是rybh文件夹中的图片
File file = new File(basePath+"\\"+rybh);
String[] filelist = file.list();
for (int i = 0; i < filelist.length; i++) {
Map<String,String> map = new HashMap<>();
//读取每个图片的二进制流并通过base64加密
File readfile = new File(basePath+"\\"+rybh + "\\" + filelist[i]);
try {
//byte[] imgStr = buildFingerUtil.readInputStream(readfile);//原始图片流
String imgStr1 = buildFingerUtil.encodeBase64File(readfile);//解密后的二进制bs64流
//String imgStr1 = buildFingerUtil.compressPic(basePath+"\\"+rybh + "\\" + filelist[i]);//先解压,然后压缩的二进制bs64流
//String imgStr1 = buildFingerUtil.compressPic(readfile);//压缩后的二进制bs64流
//String imgStr = buildFingerUtil.baseurlPhotos(imgStr1);
System.out.println("imgStr1==="+imgStr1);
/*String target = "F:/test/xzzw/eww"+i+".bmp";
buildFingerUtil.decoderBase64File(imgStr,target);
File xsfile = new File(target);
buildFingerUtil.xs(xsfile);*/
//处理照片
map.put(readfile.getPath(), imgStr1);
list.add(map);
}catch(Exception e){
System.out.println("生成文件名和图片流对应关系异常"+e);
}
}
return list;
}
/**
* 通过反射机制生成xml字符串
* @param pkghdobj 包头标签名
* @param pkghdos 包头标签值
* @param descriptiveMsgobj 描述标签名
* @param descriptiveMsgos 描述标签值
* @param collectInfoMsgobj 集合标签名
* @param collectInfoMsgos 集合标签值
* @param fingerMsgobj 指纹标签名
* @param fingerMsgos 指纹标签值
* @return
*/
public String getParamXml(Object pkghdobj,Object[] pkghdos,Object descriptiveMsgobj,Object[] descriptiveMsgos,Object collectInfoMsgobj,Object[] collectInfoMsgos,Object fingerMsgobj,Object[] fingerMsgos){
String bizParamXml = "";
StringWriter sw = new StringWriter();//xml字符串
Document document = DocumentHelper.createDocument();//创建document对象
Element root = document.addElement("package");//根节点
//生成包头标签信息
buildFingerUtil.buildElement(root,pkghdobj,pkghdos,"packageHead");
//捺印指掌纹信息
Element fingerElement = root.addElement("fingerprintPackage");
//生成descriptiveMsg标签信息
buildFingerUtil.buildElement(fingerElement,descriptiveMsgobj,descriptiveMsgos,"descriptiveMsg");
//生成collectInfoMsg标签信息
buildFingerUtil.buildElement(fingerElement,collectInfoMsgobj,collectInfoMsgos,"collectInfoMsg");
//生成fingers标签
Element fingersElement = fingerElement.addElement("fingers");
//生成fingerMsg标签信息
buildFingerUtil.buildElement(fingersElement,fingerMsgobj,fingerMsgos,"fingerMsg");
OutputFormat format = OutputFormat.createCompactFormat();// 缩进格式
format.setEncoding("UTF-8");// 编码
format.setTrimText(true);
//File file = new File("F://test/xzzwb/R6100000000002021050095/R6100000000002021050095.xml");
XMLWriter xmlwriter = new XMLWriter(sw,format);
try {
//XMLWriter xmlwriter = new XMLWriter(new FileOutputStream(file),format);
xmlwriter.write(document);
xmlwriter.close();
sw.close();
bizParamXml = sw.toString();// 生成的xml字符串
} catch (IOException e) {
System.out.println("生成xml字符串异常!"+e);
e.printStackTrace();
}
//System.out.println(bizParamXml);
return bizParamXml;
}
/**
* 将xml字符串生成对应的.fptx文件
* @param rybh
* @param xmlStr
*/
public Boolean createXmlFile(String rybh,String xmlStr){
Boolean bool = false;
Properties properties = new Properties();
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("founder_zwcj.properties");
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
String xmlpath = properties.getProperty("xmlpath");//读取图片路径
String fullpath = xmlpath+"/"+rybh+"/";
File dir = new File(fullpath);
if(!dir.exists()) {
if(dir.mkdir()) {
System.out.println("创建目录{}成功"+ fullpath);
}
}
String targetPath = fullpath +rybh+".fptx";
File file = new File(targetPath);
try {
if (!file.exists()) {
file.createNewFile();
System.out.println("文件"+targetPath+"创建成功!");
}
buildFingerUtil.createFile(xmlStr,targetPath);
bool = true;
} catch (Exception e) {
e.printStackTrace();
bool = false;
}
return bool;
}
/**
* 将文件打包成zip包
* @param rybh
* @return
*/
public Boolean fileToZip(String rybh){
Boolean bool = false;
Properties properties = new Properties();
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("founder_zwcj.properties");
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
String xmlpath = properties.getProperty("xmlpath");//读取图片路径
String fullpath = xmlpath+"/";
File dir = new File(fullpath);
if(!dir.exists()) {
if(dir.mkdir()) {
System.out.println("创建目录{}成功"+ fullpath);
}
}
//指定文件路径
String sourceFilePath = fullpath+rybh;
//打成压缩包的路径
String zipFilePath = fullpath +rybh;
bool = FileZipUtil.fileToZip(sourceFilePath,zipFilePath,rybh);
return bool;
}
}
package com.finger.service.impl;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.Properties;
/**
* Created by founder on 2021/6/28.
*/
@Service
public class fingerInfoAnalyService {
public String getCommonUrl(){
//生成bmp图片的路径
Properties properties = new Properties();
java.io.InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("founder_zwcj.properties");
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
String basePath = properties.getProperty("path");
return basePath;
}
}
package com.mapper.fingerAnalysis;
import com.finger.domain.fingerconfig;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* Created by zhouxiao on 2021/7/7.
*/
@Mapper
public interface fingerConfigMapper {
List<fingerconfig> queryzwsbInfo(fingerconfig fgcfg);
int savecjsb(fingerconfig fgcfg);
List<fingerconfig> querycjsb(fingerconfig fgcfg);
int editcjsb(fingerconfig fgcfg);
int savejkxx(fingerconfig fgcfg);
List<fingerconfig> queryjkxx(fingerconfig fgcfg);
int editjkxx(fingerconfig fgcfg);
int savecssz(fingerconfig fgcfg);
List<fingerconfig> querycssz(fingerconfig fgcfg);
int editcssz(fingerconfig fgcfg);
int savezwjc(fingerconfig fgcfg);
List<fingerconfig> queryzwjc(fingerconfig fgcfg);
int editzwjc(fingerconfig fgcfg);
}
#?\u5B9E\u4F53bean\u76EE\u5F55
mybatis.type-aliases-package=com.finger.domain
#?\u6307\u5B9Asql\u6620\u5C04\u6587\u4EF6
mybatis.mapperLocations=classpath*:mybatis/fingerconfig/*.xml
#\u6570\u636E\u6E90\u914D\u7F6E
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://192.168.110.132:3306/gkpt?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverReadOnly=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.druid.test-on-borrow=true
spring.datasource.druid.test-while-idle=true
\ No newline at end of file
path =F://test//xzzw
xmlpath=F://test//xzzwb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<classPathEntry location="F:\idea\zzwcjfw\lib\mysql-connector-java-5.1.20-bin.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="false"/>
</commentGenerator>
<!--数据库连接驱动类,URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.110.131:3306/gkpt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai" userId="root" password="123456">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成(实体)模型的包名和位置-->
<javaModelGenerator targetPackage="com.ocean.pojo" targetProject="src">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 生成XML映射文件的包名和位置-->
<sqlMapGenerator targetPackage="resources.mapping" targetProject="src">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO接口的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.ocean.dao" targetProject="src">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table tableName="userInfo" domainObjectName="UserInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>
\ No newline at end of file
package com;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ZzwcjfwApplicationTests {
@Test
void contextLoads() {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
</web-app>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment