#阿里連接池配置 #spring.datasource.druid.driver-class-name=oracle.jdbc.driver.OracleDriver #可配可不配,阿里的數據庫連接池會通過url自動搜尋 spring.datasource.druid.url=jdbc:oracle:thin:@localhost:1521:orcl spring.datasource.druid.username=scott spring.datasource.druid.password=tiger spring.datasource.druid.initial-size=5 spring.datasource.druid.max-active=20 spring.datasource.druid.min-idle=10 spring.datasource.druid.max-wait=10 #是否緩存preparedStatement,也就是PSCache。PSCache對支持游標的數據庫性能提升巨大,比如說oracle。 #在mysql5.5以下的版本中沒有PSCache功能,建議關閉掉。 #spring.datasource.druid.pool-prepared-statements=true #配置間隔多久才進行一次檢測,檢測需要關閉的空閑連接,單位是毫秒 #spring.datasource.druid.time-between-eviction-runs-millis=60000 #配置一個連接在池中最小生存的時間,單位是毫秒 #spring.datasource.druid.min-evictable-idle-time-millis=300000 #配置擴展插件:監控統計用的filter:stat 日志用的filter:log4j 防御sql注入的filter:wall #spring.datasource.druid.filters=stat,wall #spring.datasource.druid.filter.stat.log-slow-sql=true #spring.datasource.druid.filter.stat.slow-sql-millis=2000 #自定義配置端口號 server.port=8889 #配置項目訪問時上下文路徑(項目名稱) #server.servlet.context-path=/sbm #mybatis相關的配置 #實體別名配置 配置上后,以后在mapper文件中的resultType中原來配置的com.guangming.springboot.entity.Dept就可以直接寫成dept mybatis.type-aliases-package=com.guangming.springboot.entity #mybatis掃描mapper文件的配置 mybatis.mapper-locations=classpath:mapper/*.xml #靜態資源目錄配置 spring.resources.static-locations=classpath:/templates/,classpath:/static/,classpath:/resources/