書名: 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.
推薦閱讀
- Progressive Web Apps with React
- Hyper-V 2016 Best Practices
- Instant Apache Stanbol
- Python神經網絡項目實戰
- Unity Shader入門精要
- Learning Data Mining with R
- 組態軟件技術與應用
- Python High Performance Programming
- OpenResty完全開發指南:構建百萬級別并發的Web應用
- Mastering Git
- Statistical Application Development with R and Python(Second Edition)
- JavaScript程序設計(第2版)
- UML軟件建模
- 少兒編程輕松學(全2冊)
- 精益軟件開發管理之道