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

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

主站蜘蛛池模板: 荃湾区| 太保市| 巴林左旗| 霍林郭勒市| 中西区| 府谷县| 凤城市| 清水河县| 项城市| 南乐县| 靖远县| 平谷区| 铁力市| 永春县| 桂平市| 灯塔市| 家居| 都兰县| 平安县| 南宫市| 正定县| 石泉县| 商南县| 昌邑市| 乌海市| 德钦县| 望谟县| 闽侯县| 城市| 阜阳市| 呼图壁县| 武定县| 铜鼓县| 大理市| 前郭尔| 安溪县| 中方县| 克东县| 邵阳县| 山阳县| 新竹县|