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

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

主站蜘蛛池模板: 镇原县| 密山市| 桦甸市| 双峰县| 全椒县| 都安| 沅陵县| 白城市| 元朗区| 阳山县| 兴宁市| 鲁山县| 望奎县| 方正县| 广河县| 三原县| 辽阳县| 乡宁县| 枝江市| 定日县| 乌兰浩特市| 汕头市| 东台市| 岳阳市| 米脂县| 高淳县| 军事| 开原市| 屏边| 铜川市| 靖江市| 泽普县| 隆安县| 叶城县| 大宁县| 阆中市| 宁陕县| 玛多县| 永宁县| 阳城县| 嘉鱼县|