pom:

<?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>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.lanya</groupId>
<artifactId>zshgch</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>zshgch</name>
<description>Demo project for Spring Boot</description> <properties>
<java.version>1.8</java.version>
</properties> <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency> <!-- MySQL的jdbc驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!--开发工具,包含热部署功能-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.54</version>
</dependency> <!--thymeleaf依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency> <!-- springboot 开发自动热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency> </dependencies> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<!--配置文件的位置-->
<configurationFile>src/main/resources/prepare.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
</dependencies>
</plugin>
</plugins> <resources>
<!--src/main/java目录下的mybatis的mapper.xml需要编译到class下面去-->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource> <!--把src/main/resources目录下的所有的配置文件都编译到class下面去-->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource> <!--&lt;!&ndash;运行springboot程序,访问jsp需要配置如下的resource&ndash;&gt;
<resource>
<directory>src/main/webapp</directory>
<targetPath>META-INF/resources</targetPath>
<includes>
<include>**/*.*</include>
</includes>
</resource>-->
</resources> </build> <repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
</project> application:
#mysql:
#配置MySQL服务器地址
spring.datasource.url=jdbc:mysql://localhost:3306/roomtest?useUnicode=true&&characterEncoding=UTF-8&&serverTimezone=UTC
#配置MySQL用户名
spring.datasource.username=root
#配置MySQL密码
spring.datasource.password=123
#mybatis:
#配置mapper xml文件所在的路径
mybatis.mapper-locations=classpath*:com/lanya/zshgch/dao/**/*.xml
#配置映射类所在的包名
mybatis.type-aliases-package=com.lanya.zshgch.bean
#tomcat:
#配置web服务器端口
server.port=8081
#配置初始化地址
server.servlet.context-path=/demo
#配置tomcat最大线程
server.tomcat.max-threads=1000 configuration:
<?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>
<!--mysql 连接数据库jar 这里选择自己本地位置--> <classPathEntry location="C:\Users\hp\.m2\repository\mysql\mysql-connector-java\5.1.34" /> <context id="testTables" targetRuntime="MyBatis3">
<commentGenerator>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.64.21:3306/roomtest"
userId="root"
password="123456">
</jdbcConnection>
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
NUMERIC 类型解析为java.math.BigDecimal -->
<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver> <!-- targetProject:生成PO类的位置 -->
<javaModelGenerator targetPackage="com.lanya.zshgch.bean"
targetProject=".\src\main\java">
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
<!-- 从数据库返回的值被清理前后的空格 -->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- targetProject:mapper映射文件生成的位置 -->
<sqlMapGenerator targetPackage="com.lanya.zshgch.dao"
targetProject=".\src\main\java">
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>
<!-- targetPackage:mapper接口生成的位置 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.lanya.zshgch.dao"
targetProject=".\src\main\java">
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
</javaClientGenerator>
<!-- 指定数据库表 -->
<table tableName="base_station"></table>
<table tableName="employee"></table>
<table tableName="env_factor"></table>
<table tableName="location"></table>
<table tableName="room"></table>
<!-- <table tableName="demo01"></table>
<table tableName="user"></table>-->
</context>
</generatorConfiguration>

pom.xml文件模板、application文件模板、configuration逆向生成文件、的更多相关文章

  1. MiniWord .NET Word模板引擎,藉由Word模板和数据简单、快速生成文件。

    Github / Gitee QQ群(1群) : 813100564 / QQ群(2群) : 579033769 介绍 MiniWord .NET Word模板引擎,藉由Word模板和数据简单.快速生 ...

  2. Maven pom.xml 配置说明: 打jar包不包括指定资源文件和.class xml,配置不跑testCase,建pom父子项目

    **maven如何配置打jar包时,一些class 或者资源文件不打进来,把classpath的xml文件打进jar <build> <!--针对资源文件--> <res ...

  3. mybatis-generator自動逆向生成文件

    首先在maven里面添加插件 <plugins> <plugin> <groupId>org.mybatis.generator</groupId> & ...

  4. 刨析Maven(对pom.xml配置文件常用标签的解析)

    昨天在阿里云看到了一句话,"当你Learning和Trying之后,如果能尽量把Teaching也做好,会促进我们思考".共勉! 这是关于Maven的第三篇博客,这次我们深入了解p ...

  5. cat 生成文件 运行脚本

    nohup python -u day_std_cid_list_data_done.py >eee1.log 2>&1 & 后台运行python脚本 hadoop fs ...

  6. 利用IDEA上传文件到coding仓库 使用git上传文件github

    1.注册帐号 coding官网: https://coding.net/ github官网:https://github.com (以上根据自己需求注册,在下就不帖图了写步骤了) 2.下载 Git g ...

  7. eclipse的xml文件提示templates的模板.md

    eclipse的xml文件提示templates的模板 <?xml version="1.0" encoding="UTF-8" standalone=& ...

  8. 使用eclipse搭建springboot项目pom.xml文件第一行报错(Maven Configuration Problem)

    今天在https://start.spring.io/上搭建了一个2.1.5版本的springboot项目,但是把它导入后,pom.xml第一行报错了,查看Problems发现下面的错误 百度后发现方 ...

  9. Maven pom.xml文件深度学习

    本文介绍Maven项目构建中,pom.xml文件的生成规则和常用节点的使用方法.pom.xml官方网址:http://maven.apache.org/pom.html pom简介 pom作为项目对象 ...

随机推荐

  1. CentOS7搭建Zookeeper环境

    Linux下安装JDK 1.检查一下系统中的jdk版本 [root@localhost software]# java -version 显示: openjdk version "1.8.0 ...

  2. linux 安装 kafka&zookeeper

    安装kafka 1,下载kafka. #cd /usr/local #wget wget https://mirrors.tuna.tsinghua.edu.cn/apache/kafka/2.1.1 ...

  3. Python数据分析学习(二):Numpy数组对象基础

    1.1数组对象基础 .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { bord ...

  4. C#使用Owin技术部署轻量级webApi服务

    写在前面: 除了使用IIS可以启用WebApi之外,微软还提供了Owin技术,免除了IIS繁琐的部署配置,只需要运行编写好的程序,即可启用webApi服务,是不是很爽呢? 对于Owin技术的详细介绍这 ...

  5. ireport使用总结

    ireport使用基础经验总结: 1.设置打印文件的纸张类型和大小   编辑->报表属性 2.设置纸张大小和空间(用于编辑打印内容)  鼠标右键空白处->栏的属性 以上所有部分共同组成打印 ...

  6. 【Spring学习】Spring的源码解析之路

    缘起:=====>>>> 在项目中实际上是用到了Spring的内容,只是直接用的SpringBoot,不管是Eclipse中还是在Intellig IDEA中,应该都比较容易能 ...

  7. 2018-2019-2 20165315 《网络对抗技术》Exp4 恶意代码分析

    2018-2019-2 20165315 <网络对抗技术>Exp4 恶意代码分析 一.实验要求 1.系统运行监控 使用如计划任务,每隔一分钟记录自己的电脑有哪些程序在联网,连接的外部IP是 ...

  8. log4j2.xml日志文件设置文件路径

    笔者最近的项目里使用了spring,spring通过web.xml配置监听器,在web启动时web.root系统变量,以供其他变量使用,例如 在属性文件里使用${web.root}以取得完整路径,项目 ...

  9. Left Join B表,只取B表一条记录

    --用OUTER APPLY select b.* FROM a表 a OUTER APPLY () * from b表 WHERE [Name] = a.[AName] ORDER BY BNo d ...

  10. Security.ssl-pinning

    SSL Pinning 1. What's SSL Pinning? "SSL Pinning is making sure the client checks the server’s c ...