- Kotlin Blueprints
- Ashish Belagali Hardik Trivedi Akshay Chordiya
- 132字
- 2021-07-02 21:50:17
Application configuration
SpringApplication will load properties from the application.yml file and add them to the Spring Environment.
Let's specify properties for our Spring application in the application.yml file:
logging:
level:
org.springframework.web.servlet: INFO
spring:
datasource:
platform: "postgis"
driver-class-name: "org.postgis.DriverWrapper"
url: "jdbc:postgresql_postGIS://localhost/geo"
username: "postgres"
password: "root"
mvc:
async:
request-timeout: 1000000
Tasync request timeout is crucial because saving the message into the database takes time and the process is asynchronous and an event is triggered when it is saved. Here the response takes more time than normal to get back, hence we increase the request timeout.
The data-source properties (database) point to our PostGIS database:
url: "jdbc:postgresql_postGIS://localhost/YOUR_DATABASE_NAME"
Make sure to change YOUR_DATABASE_NAME to the name of your PostGIS database, also change the username and password based on your database credentials.
推薦閱讀
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- Android系統級深入開發
- SQL Server實用教程(SQL Server 2008版)
- 基于ARM Cortex-M4F內核的MSP432 MCU開發實踐
- ASP.NET程序開發范例寶典
- Java SE實踐教程
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- Android群英傳
- Android應用開發深入學習實錄
- UML2面向對象分析與設計(第2版)
- 智能手機故障檢測與維修從入門到精通
- Web編程基礎:HTML5、CSS3、JavaScript(第2版)
- HTML5與CSS3權威指南
- HTML5 WebSocket權威指南
- Visual C++程序開發范例寶典