|
|
|
# 开发环境
|
|
|
|
server.port=8080
|
|
|
|
server.servlet.context-path=
|
|
|
|
spring.mvc.static-path-pattern=/static/**
|
|
|
|
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:/file-upload
|
|
|
|
spring.application.name=${projectName?default("SpringBoot")}
|
|
|
|
spring.main.banner-mode=CONSOLE
|
|
|
|
spring.devtools.restart.enabled=true
|
|
|
|
<#if project.needCloud>
|
|
|
|
eureka.client.serviceUrl.defaultZone=http://localhost:18080/eureka/
|
|
|
|
</#if>
|
|
|
|
# 编码配置
|
|
|
|
spring.http.encoding.force=true
|
|
|
|
spring.http.encoding.charset=UTF-8
|
|
|
|
spring.http.encoding.enabled=true
|
|
|
|
server.tomcat.uri-encoding=UTF-8
|
|
|
|
# 日志配置
|
|
|
|
logging.path=D://
|
|
|
|
logging.levels=DEBUG
|
|
|
|
<#if project.needMoreDB>
|
|
|
|
# ==================================================================================
|
|
|
|
<#if dataBase == 'Oracle'>
|
|
|
|
# 主数据库
|
|
|
|
spring.datasource.main.driver-class-name=oracle.jdbc.driver.OracleDriver
|
|
|
|
spring.datasource.main.jdbc-url=jdbc:oracle:thin:@127.0.0.1:1521:main
|
|
|
|
spring.datasource.main.username=main_user
|
|
|
|
spring.datasource.main.password=main_pws
|
|
|
|
|
|
|
|
# 副数据库
|
|
|
|
spring.datasource.two.driver-class-name=oracle.jdbc.driver.OracleDriver
|
|
|
|
spring.datasource.two.jdbc-url=jdbc:oracle:thin:@127.0.0.1:1521:two
|
|
|
|
spring.datasource.two.username=two_user
|
|
|
|
spring.datasource.two.password=two_pwd
|
|
|
|
</#if>
|
|
|
|
<#if dataBase == 'MySQL'>
|
|
|
|
# 主数据库
|
|
|
|
spring.datasource.main.driver-class-name=com.mysql.jdbc.Driver
|
|
|
|
spring.datasource.main.url=jdbc:mysql://192.168.31.81:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
|
|
|
spring.datasource.main.username=test
|
|
|
|
spring.datasource.main.password=123456
|
|
|
|
|
|
|
|
# 副数据库
|
|
|
|
spring.datasource.two.driver-class-name=com.mysql.jdbc.Driver
|
|
|
|
spring.datasource.two.url=jdbc:mysql://192.168.31.81:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
|
|
|
spring.datasource.two.username=test
|
|
|
|
spring.datasource.two.password=123456
|
|
|
|
</#if>
|
|
|
|
<#if dataBase == 'SQLite'>
|
|
|
|
# 主数据库
|
|
|
|
spring.datasource.main.driver-class-name=org.sqlite.JDBC
|
|
|
|
spring.datasource.main.url=jdbc:sqlite:${projectName?default("SpringBoot")}.db3?date_string_format=yyyy-MM-dd HH:mm:ss
|
|
|
|
spring.datasource.main.username=test
|
|
|
|
spring.datasource.main.password=123456
|
|
|
|
|
|
|
|
# 副数据库
|
|
|
|
spring.datasource.two.driver-class-name=org.sqlite.JDBC
|
|
|
|
spring.datasource.two.url=jdbc:sqlite:${projectName?default("SpringBoot")}.db3?date_string_format=yyyy-MM-dd HH:mm:ss
|
|
|
|
spring.datasource.two.username=test
|
|
|
|
spring.datasource.two.password=123456
|
|
|
|
</#if>
|
|
|
|
# ==================================================================================
|
|
|
|
<#else>
|
|
|
|
<#if dataBase == 'Oracle'>
|
|
|
|
# Oracle
|
|
|
|
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
|
|
|
|
spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
|
|
|
|
spring.datasource.username=TEST
|
|
|
|
spring.datasource.password=123456
|
|
|
|
</#if>
|
|
|
|
<#if dataBase == 'MySQL'>
|
|
|
|
# MySQL
|
|
|
|
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
|
|
|
spring.datasource.url=jdbc:mysql://192.168.31.81:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
|
|
|
spring.datasource.username=test
|
|
|
|
spring.datasource.password=123456
|
|
|
|
</#if>
|
|
|
|
<#if dataBase == 'SQLite'>
|
|
|
|
# SQLite spring.datasource.url=jdbc:sqlite::resource:example.db3
|
|
|
|
spring.datasource.driver-class-name=org.sqlite.JDBC
|
|
|
|
spring.datasource.url=jdbc:sqlite:${projectName?default("SpringBoot")}.db3?date_string_format=yyyy-MM-dd HH:mm:ss
|
|
|
|
spring.datasource.username=test
|
|
|
|
spring.datasource.password=123456
|
|
|
|
</#if>
|
|
|
|
# mybatis
|
|
|
|
mybatis.mapper-locations=classpath:**/mpr/*.xml
|
|
|
|
mybatis.configuration.map-underscore-to-camel-case=true
|
|
|
|
</#if>
|
|
|
|
# pagehelper
|
|
|
|
pagehelper.autoRuntimeDialect=true
|
|
|
|
pagehelper.reasonable=false
|
|
|
|
pagehelper.supportMethodsArguments=true
|
|
|
|
pagehelper.params=count=countSql
|
|
|
|
# jackson 相关配置
|
|
|
|
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
|
|
|
|
spring.jackson.time-zone=GMT+8
|
|
|
|
spring.jackson.default-property-inclusion=non_null
|
|
|
|
spring.jackson.mapper.sort-properties-alphabetically=true
|
|
|
|
spring.jackson.deserialization.fail-on-unknown-properties=false
|
|
|
|
# freemarker
|
|
|
|
spring.freemarker.enabled=true
|
|
|
|
spring.freemarker.allow-request-override=false
|
|
|
|
spring.freemarker.cache=true
|
|
|
|
spring.freemarker.check-template-location=true
|
|
|
|
spring.freemarker.charset=UTF-8
|
|
|
|
spring.freemarker.content-type=text/html
|
|
|
|
spring.freemarker.expose-request-attributes=false
|
|
|
|
spring.freemarker.expose-session-attributes=false
|
|
|
|
spring.freemarker.expose-spring-macro-helpers=false
|
|
|
|
spring.freemarker.settings.template_update_delay=1
|
|
|
|
spring.freemarker.settings.locale=zh_CN
|
|
|
|
spring.freemarker.settings.datetime_format=yyyy-MM-dd HH:mm:ss
|
|
|
|
spring.freemarker.settings.date_format=yyyy-MM-dd
|
|
|
|
spring.freemarker.settings.number_format=#.##
|
|
|
|
spring.freemarker.settings.classic_compatible=true
|
|
|
|
spring.freemarker.settings.whitespace_stripping=true
|
|
|
|
spring.freemarker.settings.url_escaping_charset=utf-8
|
|
|
|
# 文件上传配置
|
|
|
|
spring.servlet.multipart.resolveLazily=false
|
|
|
|
spring.servlet.multipart.max-file-size=100MB
|
|
|
|
spring.servlet.multipart.max-request-size=100MB
|
|
|
|
server.tomcat.max-http-post-size=-1
|
|
|
|
|
|
|
|
# 自定义配置
|
|
|
|
# 根路径默认页,'/'跳转至该页
|
|
|
|
web.url.index=/index.htm
|
|
|
|
# 登录页
|
|
|
|
web.url.login=/login.htm
|
|
|
|
# 拦截验证
|
|
|
|
web.url.auth.included=/,/**/*.htm,/ajax/**,/api/**
|
|
|
|
# 直接放行
|
|
|
|
web.url.auth.excluded=/login.htm,/ajax/system/User/login
|
|
|
|
# 超级管理员
|
|
|
|
web.url.auth.admin=admin
|
|
|
|
web.url.auth.pwd=17fac3376f76d65943d1d26d1f7cb1e5
|