{"id":21588792,"url":"https://github.com/imsma/springboot-sqlite","last_synced_at":"2026-04-30T16:32:24.872Z","repository":{"id":262306094,"uuid":"886702863","full_name":"imsma/springboot-sqlite","owner":"imsma","description":"This repository contains a simple Spring Boot application that demonstrates how to integrate SQLite as an embedded database. This project is perfect for learning and understanding how to work with Spring Boot and an embedded database for development and testing purposes.","archived":false,"fork":false,"pushed_at":"2024-11-11T17:47:19.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T05:53:03.134Z","etag":null,"topics":["java","jpa","spring-boot","sqlite"],"latest_commit_sha":null,"homepage":"https://sma.im","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imsma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-11T13:02:55.000Z","updated_at":"2024-11-23T15:52:20.000Z","dependencies_parsed_at":"2024-11-11T18:50:02.524Z","dependency_job_id":null,"html_url":"https://github.com/imsma/springboot-sqlite","commit_stats":null,"previous_names":["imsma/springboot-sqlite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imsma/springboot-sqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspringboot-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspringboot-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspringboot-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspringboot-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imsma","download_url":"https://codeload.github.com/imsma/springboot-sqlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspringboot-sqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32470879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jpa","spring-boot","sqlite"],"created_at":"2024-11-24T16:11:12.689Z","updated_at":"2026-04-30T16:32:24.852Z","avatar_url":"https://github.com/imsma.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot SQLite Example\n\nWelcome to the **Spring Boot SQLite Example** project! This repository contains a simple Spring Boot application that demonstrates how to integrate SQLite as an embedded database. This project is perfect for learning and understanding how to work with Spring Boot and an embedded database for development and testing purposes.\n\n## Project Overview\n\nThis project walks you through creating a Spring Boot application from scratch that uses SQLite as an embedded database. We start by setting up the project using Spring Initializr, creating the data model, configuring the data source, and exposing REST APIs to interact with the data.\n\n### Features\n\n- **Spring Boot Integration**: Uses Spring Boot to create a RESTful application.\n- **SQLite Embedded Database**: Lightweight database perfect for prototyping and testing.\n- **CRUD Operations**: Basic CRUD operations using Spring Data JPA.\n- **Well-Structured Codebase**: Organized into packages for configurations, domain models, repositories, and controllers.\n\n## Getting Started\n\n### Prerequisites\n\n- Java 21 or higher\n- Maven\n- IDE of your choice (e.g., IntelliJ, VS Code)\n\n### Cloning the Repository\n\nYou can clone this repository using any of the following methods:\n\n- **HTTPS Clone URL**: `https://github.com/imsma/springboot-sqlite.git`\n- **SSH Clone URL**: `git@github.com:imsma/springboot-sqlite.git`\n- **GitHub CLI Command**: `gh repo clone imsma/springboot-sqlite`\n\n### Project Setup\n\nTo set up the project locally, follow these steps:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/imsma/springboot-sqlite.git\n   cd springboot-sqlite\n   ```\n2. Open the project in your IDE.\n3. Build the project using Maven:\n   ```sh\n   mvn clean install\n   ```\n4. Run the application:\n   ```sh\n   mvn spring-boot:run\n   ```\n\nThe application should now be running on `http://localhost:8080`.\n\n## Project Structure\n\n- **config**: Contains configuration classes (e.g., for the database).\n- **domain**: Contains the entity classes.\n- **repository**: Contains repository interfaces for data access.\n- **web/controller**: Contains REST controllers for API endpoints.\n\n## API Endpoints\n\n- **Get All Users**: `GET /users`\n- **Create User**: `POST /users` (Content-Type: `application/json`)\n\n### Example API Requests\n\nWe recommend using the REST Client extension for VS Code to test the APIs. You can create a directory named `src/test/http` and add a `test.http` file to test the APIs as follows:\n\n```http\n### Get All Users\nGET http://localhost:8080/users\n\n### Create User\nPOST http://localhost:8080/users\nContent-Type: application/json\n\n{\n    \"name\": \"Kim Doe\",\n    \"email\": \"kim@test.com\"\n}\n```\n\n## Configuration\n\nMake sure to configure the `application.yml` file under `src/main/resources`:\n\n```yaml\nspring:\n  datasource:\n    url: jdbc:sqlite:mydatabase.db\n    driver-class-name: org.sqlite.JDBC\n  jpa:\n    hibernate:\n      ddl-auto: update\n    properties:\n      hibernate.dialect: org.hibernate.dialect.SQLiteDialect\n    show-sql: true\n```\n\n## Additional Tips\n\n- **Testing**: We highly recommend adding unit and integration tests to ensure the stability of your application.\n- **Data Initialization**: You can use `@PostConstruct` or Spring Boot features to initialize some dummy data for testing.\n- **Production Readiness**: SQLite is great for development, but for production, consider using a more robust database like PostgreSQL or MySQL.\n- **Security**: Ensure that endpoints are properly secured using Spring Security for production environments.\n\n## Resources\n\nFor more detailed steps on creating this application, please refer to the related article at [https://sma.im](https://sma.im).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nIf you have any questions or suggestions, feel free to reach out or open an issue on GitHub.\n\nHappy coding, and don’t forget to ⭐ the repo if you found this helpful!\n\n---\n\nThanks for checking out this Spring Boot SQLite example. If you want more articles, guides, and tutorials, make sure to visit my blog: [https://sma.im](https://sma.im).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsma%2Fspringboot-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimsma%2Fspringboot-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsma%2Fspringboot-sqlite/lists"}