


In src/main/resources/application yml configuration in the data source information TestCompile ":kotlin-test-junit:$kotlin_version" TestCompile ":spring-boot-starter-test:$spring_boot_version" Kotlin integration SpringBoot The default parameter-free constructor, which sets all classes by default open Class plug-inĬlasspath(":kotlin-noarg:$kotlin_version")Ĭlasspath(":kotlin-allopen:$kotlin_version")Ĭompile ":kotlin-stdlib-jre8:$kotlin_version"Ĭompile ":spring-boot-starter-web:$spring_boot_version" Take MySQL database as an example, first introduce the dependency package of MySQL connection, and add in adle:Ĭompile "mysql:mysql-connector-java:$mysql_version"Įxt.spring_boot_version = '1.5.4.RELEASE'Ĭlasspath ":kotlin-gradle-plugin:$kotlin_version"Ĭlasspath(":spring-boot-gradle-plugin:$spring_boot_version") The following configuration is introduced in adle:Ĭompile ":spring-boot-starter-jdbc:$spring_boot_version" The following are several different database configuration methods.įirst, in order to connect to the database, jdbc support is introduced. When we access the database, we need to configure a data source first. This article shows examples of configuring data sources and writing data access through Spring Boot. After receiving an access request, the server needs to access the database to obtain and process the content into the form of data presented to the user.

In general, both App and Web applications require content, and content is usually stored in various types of databases. I've covered some examples of the Web layer, including building RESTful API and rendering Web views using the Thymeleaf template engine, but these are not enough to build a dynamic application.
