https://github.com/thanhlt-1007/kotlinhello
Learn Kotlin Spring Boot
https://github.com/thanhlt-1007/kotlinhello
kotlin-spring-boot wip
Last synced: 4 months ago
JSON representation
Learn Kotlin Spring Boot
- Host: GitHub
- URL: https://github.com/thanhlt-1007/kotlinhello
- Owner: thanhlt-1007
- Created: 2023-08-22T02:34:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-25T02:14:56.000Z (almost 2 years ago)
- Last Synced: 2025-01-07T05:27:42.419Z (6 months ago)
- Topics: kotlin-spring-boot, wip
- Language: Kotlin
- Homepage: https://kotlinlang.org/docs/jvm-get-started-spring-boot.html
- Size: 83 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KOTLIN HELLO
## 1. Development Environment
- Spring Boot 3.1.2
- Gradle 8.2.1
- Java 17.0.7
- Kotlin 1.7.21
## 2. Spring Boot Dependencies
## a. Web
- Spring Web
## b. SQL
- Spring Data JDBC
- H2 Database
## c. Dotenv
- Dotenv Kotlin 6.4.1
## 3. Getting Started
- Command
```sh
./gradlew bootRun
```- Access
```sh
http://localhost:8080
```## 4. Endpoints
### a. Web
```sh
curl -X GET 'http://localhost:8080?name=John'
``````sh
curl -X GET 'http://localhost:8080/envs'
```### b. API
```sh
curl -X GET 'http://localhost:8080/api/v1/messages'
``````sh
curl -X POST 'http://localhost:8080/api/v1/messages' \
-H "Content-Type: application/json" \
--data '{
"text": "dummy text"
}'
``````sh
curl -X POST 'http://localhost:8080/api/v1/messages' \
-H "Content-Type: application/json" \
--data '{
"id": "424a6d52-1c34-4c7d-8c61-680b8c37e72e",
"text": "upda6te dummy text"
}'
``````sh
curl -X GET 'http://localhost:8080/api/v1/messages/424a6d52-1c34-4c7d-8c61-680b8c37e72e'
```