boot大發好! 分享一波配置文件 ############################################################ # # Server 配置 # ############################################################ # server.port server.port=8088 # server context-path, 通常項目發佈時不配置 server.servlet.context-path=/ombss #錯誤頁 錯誤跳轉頁的URL --> BasicErrorController #server.error.path=/error # session timeout 60 m server.session-timeout=60 # 該服務綁定的ip地址 啓動時 若是不是這個IP則報錯 # 根據業務須要來配置 #server.address=192.168.199.129 ############################################################ # Server - tomcat 經常使用配置 ############################################################ # tomcat max threads default 200 #server.tomcat.max-threads=250 # tomcat 的 URI 編碼 格式 和全部的環境編碼一致 server.tomcat.uri-encoding=UTF-8 # 存放 tomcat的日誌 DUMP等臨時文件夾 默認爲系統的tmp文件夾 #server.tomcat.basedir=H:/springboot-tomcat-tmp # 打開tomcat的Access日誌 並能夠設置 日誌格式的方法(Access 登陸) #server.tomcat.access-log-enabled=true #server.tomcat.access-log-pattern= # accesslog目錄 默認在basedir/logs #server.tomcat.accesslog.directory= # 日誌文件目錄 #logging.path=H:/springboot-tomcat-tmp # 日誌文件名稱 spring.log #logging.file=myapp.log #關閉緩存 即時刷新 #spring.freemarker.cache=false #spring.thymeleaf.cache=false #熱部署生效 spring.devtools.restart.enabled=true #設置重啓的目錄 添加哪一個目錄的文件須要 restart(監聽class文件) spring.devtools.restart.additional-paths=src/main/java #爲mabits設置 生產環境能夠刪除 restart.include.mapper=/mapper-[\\w-\.]+jar restart.include.pagehelper=/pagehelper-[\\w-\.]+jar #排除哪一個目錄文件不須要restart #spring.devtools.restart.exclude=static/,public/ #classpath目錄下的WEB-INF文件夾內容修改不重啓 #spring.devtools.restart.exclude=WEB-INF/** ############################################################ # # freemarker 靜態資源配置 # ############################################################ #設定ftl文件路徑 spring.freemarker.template-loader-path=classpath:/templates # 關閉緩存 即時刷新 上線環境 時 需改成 TRUE spring.freemarker.cache=false spring.freemarker.charset=UTF-8 spring.freemarker.check-template-location=true spring.freemarker.content-type=text/html spring.freemarker.expose-request-attributes=true spring.freemarker.expose-session-attributes=true spring.freemarker.request-context-attribute=request spring.freemarker.suffix=.ftl ############################################################ # # thymeleaf 靜態資源配置 # ############################################################ spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.html # 模式 H5 spring.thymeleaf.mode=HTML5 spring.thymeleaf.encoding=UTF-8 spring.thymeleaf.servlet.content-type=text/html # 關閉緩存 即時刷新 上線環境 時 需改成 TRUE spring.thymeleaf.cache=false ############################################################ # #配置i18n 資源文件 供thymeleaf 讀取 # ############################################################ spring.messages.basename=i18n/messages spring.messages.cache-duration=3600 spring.messages.encoding=UTF-8 #設置靜態文件路徑 js css 等 spring.mvc.static-path-pattern=/static/** ############################################################ # # 數據源 # ############################################################ spring.datasource.url=jdbc:mysql://localhost:3306/leecx?useSSL=false spring.datasource.username= spring.datasource.password= spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.druid.initial-size=1 spring.datasource.druid.min-idle=1 spring.datasource.druid.max-active=20 spring.datasource.druid.test-on-borrow=true spring.datasource.druid.stat-view-servlet.allow=true ############################################################ # # mybatis # ############################################################ # mybatis 配置 mybatis.type-aliases-package=com.sg.pojo mybatis.mapper-locations=classpath:mapper/*.xml #使全局的映射器啓用或禁用緩存。 mybatis.configuration.cache-enabled=true #全局啓用或禁用延遲加載。當禁用時,全部關聯對象都會即時加載。 mybatis.configuration.lazy-loading-enabled=true #當啓用時,有延遲加載屬性的對象在被調用時將會徹底加載任意屬性。不然,每種屬性將會按須要加載。 mybatis.configuration.aggressive-lazy-loading=true #是否容許單條sql 返回多個數據集 (取決於驅動的兼容性) default:true mybatis.configuration.multiple-result-sets-enabled=true #是否能夠使用列的別名 (取決於驅動的兼容性) default:true mybatis.configuration.use-column-label=true #容許JDBC 生成主鍵。須要驅動器支持。若是設爲了true,這個設置將強制使用被生成的主鍵,有一些驅動器不兼容不過仍然能夠執行。 default:false mybatis.configuration.use-generated-keys=true #指定 MyBatis 如何自動映射 數據基表的列 NONE:不隱射 PARTIAL:部分 FULL:所有 mybatis.configuration.auto-mapping-behavior=partial #這是默認的執行類型 (SIMPLE: 簡單; REUSE: 執行器可能重複使用prepared statements語句;BATCH: 執行器能夠重複執行語句和批量更新) mybatis.configuration.default-executor-type=simple #使用駝峯命名法轉換字段。 mybatis.configuration.map-underscore-to-camel-case=true #設置本地緩存範圍 session:就會有數據的共享 statement:語句範圍 (這樣就不會有數據的共享 ) defalut:session mybatis.configuration.local-cache-scope=session #設置但JDBC類型爲空時,某些驅動程序 要指定值,default:OTHER,插入空值時不須要指定類型 mybatis.configuration.jdbc-type-for-null=null #若是數據爲空的字段,則該字段省略不顯示,能夠經過添加配置文件,規定查詢數據爲空是則返回null。 mybatis.configuration.call-setters-on-nulls=true # 通用 Mapper 配置 (沒有添加) #mapper.mappers=com.imooc.utils.MyMapper #mapper.not-empty=false #mapper.identity=MYSQL # 分頁插件 #pagehelper.helperDialect=mysql #pagehelper.reasonable=true #pagehelper.supportMethodsArguments=true #pagehelper.params=count=countSqlcss
boot 集成容器 熱部署html