官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 黑龙江省| 南华县| 涟源市| 丰顺县| 寿阳县| 宝丰县| 浦城县| 新巴尔虎左旗| 喜德县| 体育| 景宁| 邮箱| 莱阳市| 贵溪市| 额尔古纳市| 佳木斯市| 清苑县| 重庆市| 临清市| 旬阳县| 阳东县| 陈巴尔虎旗| 习水县| 松滋市| 五指山市| 手游| 平南县| 丹巴县| 霍林郭勒市| 水富县| 方山县| 铁岭市| 渑池县| 惠来县| 读书| 西乌珠穆沁旗| 廉江市| 嘉黎县| 澎湖县| 天津市| 枣强县|