- 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.
推薦閱讀
- AngularJS Testing Cookbook
- LabVIEW Graphical Programming Cookbook
- Microsoft Dynamics 365 Extensions Cookbook
- Cross-platform Desktop Application Development:Electron,Node,NW.js,and React
- Functional Programming in JavaScript
- 人人都懂設計模式:從生活中領悟設計模式(Python實現)
- Webpack實戰:入門、進階與調優
- 區塊鏈技術與應用
- Android項目實戰:手機安全衛士開發案例解析
- 智能手機APP UI設計與應用任務教程
- SciPy Recipes
- Clojure for Java Developers
- Web App Testing Using Knockout.JS
- 軟件工程基礎與實訓教程
- Greenplum構建實時數據倉庫實踐