{"id":23122297,"url":"https://github.com/andrecaiado/spring-boot-template","last_synced_at":"2026-04-12T10:47:54.911Z","repository":{"id":244973373,"uuid":"805444276","full_name":"andrecaiado/spring-boot-template","owner":"andrecaiado","description":"A template project for Spring Boot applications.","archived":false,"fork":false,"pushed_at":"2025-02-04T17:46:26.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T04:15:04.070Z","etag":null,"topics":["docker","docker-compose","flyway","java","postgresql","spring-boot","template-project","testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrecaiado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-24T15:30:00.000Z","updated_at":"2025-02-12T09:21:45.000Z","dependencies_parsed_at":"2024-06-18T19:11:51.915Z","dependency_job_id":"6e8f263b-7cac-486c-9c59-edf9071f45ab","html_url":"https://github.com/andrecaiado/spring-boot-template","commit_stats":null,"previous_names":["andrecaiado/spring-boot-template"],"tags_count":2,"template":true,"template_full_name":null,"purl":"pkg:github/andrecaiado/spring-boot-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrecaiado%2Fspring-boot-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrecaiado%2Fspring-boot-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrecaiado%2Fspring-boot-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrecaiado%2Fspring-boot-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrecaiado","download_url":"https://codeload.github.com/andrecaiado/spring-boot-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrecaiado%2Fspring-boot-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31712292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["docker","docker-compose","flyway","java","postgresql","spring-boot","template-project","testing"],"created_at":"2024-12-17T07:18:40.037Z","updated_at":"2026-04-12T10:47:54.892Z","avatar_url":"https://github.com/andrecaiado.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Template project\nThis is a template project for Spring Boot applications. \n\n# Contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Try it out with the postman collection](#try-it-out-with-the-postman-collection)\n- [PostgreSQL database](#postgresql-database)\n  - [Database migrations with Flyway](#database-migrations-with-flyway)\n- [Spring Boot Docker Compose](#spring-boot-docker-compose)\n- [In-memory database for testing](#in-memory-database-for-testing)\n- [Running the application](#running-the-application)\n\n# Features\n- Exposes an API to perform CRUD operations on a single entity\n- Persists the data in a PostgreSQL database\n- Uses Spring Data JPA for database operations\n- Uses Flyway for database migrations\n- Uses Spring Boot Docker Compose to start and stop a Docker container running the PostgreSQL database\n- Includes a datasource configuration for testing purposes that uses the H2 in-memory database\n\n# Requirements\n\n- Java 17\n- Docker\n- Docker Compose\n\n# Getting Started\n\nThis section provides a step-by-step guide on how to run the project.\n\n## Installation\n\n1. Clone the repository by executing the following command:\n\n```shell\ngit clone https://github.com/andrecaiado/spring-boot-template.git\n```\n\n2. Navigate into the project directory:\n\n```\ncd your-repository-name\n```\n\n3. Install the dependencies by executing the following command:\n\n```shell\n./mvnw clean install\n```\n\n4. Run the application by executing the following command:\n\n```shell \n./mvnw spring-boot:run\n```\n\n## Try it out with the postman collection\n\nThe Postman collection is available here: [spring-boot-template-rest-api.postman_collection.json](spring-boot-template-rest-api.postman_collection.json)\n\n\n# PostgreSQL database\nThe PostrgreSQL configuration is located in `src/main/resources/application.yaml`. \n\nThe datasource configuration is located in the `docker-compose.yml` file so it can be picked up by Spring Boot Docker Compose.\n\n## Database migrations with Flyway\nFlyway configuration is located in `src/main/resources/application.yaml`.\n\nThe migration files are located at `src/main/resources/db/migration`.\n\n# Spring Boot Docker Compose\nWith Spring Boot Docker Compose, the container running the PostgreSQL database will be automatically started when the application is started and stopped when the application is stopped.\n\nSpring Boot Docker Compose will detect and use the `docker-compose.yml` file located in the root of the project. \n\nThe data source will be configured with the properties defined in the `docker-compose.yml` file.\n\n# In-memory database for testing\nThe datasource configuration is located in `src/test/resources/application.yaml`.\n\nWhen a test loads the application context or explicitly calls this configuration, the H2 in-memory database will be initialized.\n\nThe migrations will be applied from the files located at `src/main/resources/db/migration`. To apply a different migration to the test database, create the migration files in the `scr/test/resources` and specify the configuration in the `scr/test/resources/application.yaml` file.\n\n```yaml\nspring:\n  application:\n      flyway:\n        locations: classpath:/db/migration\n        schemas: employees\n        baselineOnMigrate: true\n        enabled: true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrecaiado%2Fspring-boot-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrecaiado%2Fspring-boot-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrecaiado%2Fspring-boot-template/lists"}