======logback.xml====
<?xml version="1.0" encoding="UTF-8"?>
<!--定义日志文件的存储地址 勿在 LogBack的配置中使用相对路径 -->
<property name="LOG_HOME" value="logs" />
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30} - %msg%n
<!-- 按照每天生成日志文件 -->
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${LOG_HOME}/logs/smsismp.log.%d{yyyy-MM-dd}.log
<!--日志文件保留天数 -->
<MaxHistory>30
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{30} - %msg%n
<!--日志文件最大的大小 -->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
<!-- 定义各个包的详细路径,继承root宝的值 -->
<logger name="com.vendingmachine.xmp" level="INFO" />
<!-- 此值由 application.properties的spring.profiles.active=dev指定-->
<springProfile name="dev">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 -->
<property name="LOG_HOME" value="logs" />
<logger name="org.springboot.sample" level="DEBUG" />
<springProfile name="pro">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 -->
<property name="LOG_HOME" value="/home" />
<logger name="org.springboot.sample2" level="INFO" />
</configuration>
========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
<groupId>com.vendingmachine.xmp
<artifactId>springboot-xpmAddition
<version>1.0.0-SNAPSHOT
<packaging>jar
<name>xpmAddition
<description>vendingmachine web
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-parent
<version>2.0.4.RELEASE
<project.build.sourceEncoding>UTF-8
<project.reporting.outputEncoding>UTF-8
<java.version>1.8
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-web
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-data-mongodb
<groupId>com.spring4all
<artifactId>mongodb-plus-spring-boot-starter
<version>1.0.0.RELEASE
<groupId>ch.qos.logback
<artifactId>logback-classic
<groupId>org.slf4j
<artifactId>jcl-over-slf4j
<groupId>org.hamcrest
<artifactId>hamcrest-all
<version>1.3
<scope>test
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-data-redis
<!--spring切面aop依赖-->
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-aop
<groupId>org.projectlombok
<artifactId>lombok
<optional>true
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-test
<scope>test
<groupId>io.jsonwebtoken
<artifactId>jjwt
<version>0.7.0
<groupId>com.github.pagehelper
<artifactId>pagehelper-spring-boot-starter
<version>1.1.2
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-actuator
<groupId>commons-io
<artifactId>commons-io
<version>2.4
<groupId>org.apache.commons
<artifactId>commons-lang3
<version>3.5
<groupId>com.alipay.sdk
<artifactId>alipay-sdk-java
<version>3.0.0
<groupId>jdom
<artifactId>jdom
<version>1.1
<groupId>org.apache.httpcomponents
<artifactId>httpclient
<version>4.4.1
<groupId>org.apache.httpcomponents
<artifactId>httpcore
<version>4.4.1
<groupId>org.springframework.boot
<artifactId>spring-boot-configuration-processor
<optional>true
<!-- 微信公众号 -->
<groupId>com.github.binarywang
<artifactId>weixin-java-mp
<version>3.1.0
<!--二维码 -->
<groupId>com.google.zxing
<artifactId>core
<version>3.2.1
<groupId>com.alibaba
<artifactId>fastjson
<version>1.1.23
<!-- 开启spring-security的支持 -->
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-security
<!-- 开启thymeleaf的spring-security的支持 -->
<groupId>org.thymeleaf.extras
<artifactId>thymeleaf-extras-springsecurity4
<!-- 表示对thymeleaf模板不再是用默认的HTML5标准来做严格限制 -->
<groupId>net.sourceforge.nekohtml
<artifactId>nekohtml
<version>1.9.22
<!-- 添加对thymeleaf的支持 -->
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-thymeleaf
<!--热加载-->
<groupId>org.springframework.boot
<artifactId>spring-boot-devtools
<optional>true</optional><!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->
<!-- 引入json的依赖 classifier必须要加这个是json的jdk的依赖-->
<groupId>net.sf.json-lib
<artifactId>json-lib
<version>2.4
<classifier>jdk15
<groupId>io.springfox
<artifactId>springfox-swagger2
<version>2.6.1
<groupId>io.springfox
<artifactId>springfox-swagger-ui
<version>2.6.1
<groupId>org.apache.maven.plugins
<artifactId>maven-compiler-plugin
<version>3.6.1
<source>1.8
<target>1.8
<groupId>org.apache.maven.plugins
<artifactId>maven-surefire-plugin
<version>2.20
<skip>true
<groupId>org.springframework.boot
<artifactId>spring-boot-maven-plugin
<directory>src/main/resources
<directory>src/main/java
<include>**/*.xml
</project>