1. 程式人生 > >springboot application.properties基礎的配置

springboot application.properties基礎的配置

資料庫的連線 spring.datasource.type=com.jolbox.bonecp.BoneCPDataSource spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost/資料庫名稱r?useUnicode=true&characterEncoding=utf8 spring.datasource.username=使用者名稱 spring.datasource.password=使用者密碼 spring.datasource.max-active=20 spring.datasource.max-idle=8 spring.datasource.min-idle=8 spring.datasource.initial-size=10 設定埠號 server.port=8080 JPA相關的配置 spring.jpa.database=MYSQL spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy 列印日誌 logging.level=debug 設定jsp spring.mvc.view.suffix=.jsp 字尾 spring.mvc.view.prefix=/WEB-INF/jsp/ 字首 spring.mvc.date-format=yyyy-MM-dd 設定時間格式 設定mybatis mybatis.mapperLocations=classpath:mappers/*.xml mybatis.typeAliasesPackage=ht.heitu.course.domain mybatis.configuration.map-underscore-to-camel-case=true mybatis.configuration.default-fetch-size=100 mybatis.configuration.default-statement-timeout=30 mybatis.configuration.auto-mapping-unknown-column-behavior=WARNING