https://github.com/evertonsavio/sql-schema-from-csv
Spring Boot application that creates a SQL schema with multiple tables from a csv file in H2 database at application startup. Integration test included.
https://github.com/evertonsavio/sql-schema-from-csv
Last synced: about 1 year ago
JSON representation
Spring Boot application that creates a SQL schema with multiple tables from a csv file in H2 database at application startup. Integration test included.
- Host: GitHub
- URL: https://github.com/evertonsavio/sql-schema-from-csv
- Owner: evertonsavio
- Created: 2024-11-10T16:23:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-12T18:51:41.000Z (over 1 year ago)
- Last Synced: 2025-02-08T09:24:23.037Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot Service
---
## Prerequisites
- Java 21
- Maven 3.6+
- Docker (optional, for containerization)
- GraalVM (optional, for native images)
## Setup
1. **Clone the repository:**
```sh
git clone
cd sql-schema-from-csv
```
2. **( OPTIONAL ) Install GraalVM:**
Follow the instructions on the [GraalVM website](https://www.graalvm.org/docs/getting-started/) to install GraalVM.
3. **Set GraalVM as the default JDK:**
```sh
export JAVA_HOME=/path/to/graalvm
export PATH=$JAVA_HOME/bin:$PATH
```
## Build and Run
1. **Build the project:**
```sh
./mvnw clean install
```
2. **Run the application:**
```sh
./mvnw spring-boot:run
```
## Running Tests
1. **Run integration tests:**
```sh
./mvnw verify
```
## Endpoints
- **Get Producers Awards Interval:**
```
GET /v1/producers
```
Example response:
```json
{
"min": [
{
"producer": "Joel Silver",
"interval": 1,
"previousWin": 1990,
"followingWin": 1991
}
],
"max": [
{
"producer": "Matthew Vaughn",
"interval": 13,
"previousWin": 2002,
"followingWin": 2015
}
]
}
```
## Additional Information
For more details, refer to the [Spring Boot documentation](https://spring.io/projects/spring-boot) and [GraalVM documentation](https://www.graalvm.org/docs/).