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

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

主站蜘蛛池模板: 奎屯市| 凤城市| 图木舒克市| 武山县| 淳化县| 延津县| 颍上县| 苏尼特左旗| 怀远县| 哈密市| 浦北县| 昌邑市| 湾仔区| 兴山县| 宝清县| 房产| 钦州市| 湟中县| 林口县| 莱州市| 略阳县| 虎林市| 太和县| 黄梅县| 浏阳市| 清涧县| 庆阳市| 阿瓦提县| 共和县| 万源市| 革吉县| 镇原县| 云南省| 城市| 阿拉善左旗| 团风县| 黎川县| 永修县| 镶黄旗| 都安| 弥渡县|