{"id":23044809,"url":"https://github.com/sarakhild/springboot-thymeleaf-crud-db-deployment","last_synced_at":"2026-05-11T03:07:08.791Z","repository":{"id":263187235,"uuid":"883097539","full_name":"SaraKhild/springboot-thymeleaf-crud-db-deployment","owner":"SaraKhild","description":"This project manages an employee database with CRUD operations and is deployed on Alibaba Cloud using Terraform for scalable infrastructure management","archived":false,"fork":false,"pushed_at":"2024-11-18T17:59:42.000Z","size":42475,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T16:12:52.459Z","etag":null,"topics":["alibabacloud","dockerfile","dokcer-compose","mysql","spring-boot","spring-jpa","terraform","thymeleaf"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/SaraKhild.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-11-04T11:22:18.000Z","updated_at":"2024-11-18T17:59:46.000Z","dependencies_parsed_at":"2024-11-16T20:36:14.705Z","dependency_job_id":null,"html_url":"https://github.com/SaraKhild/springboot-thymeleaf-crud-db-deployment","commit_stats":null,"previous_names":["sarakhild/springboot-thymeleaf-crud-db-deployment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaraKhild%2Fspringboot-thymeleaf-crud-db-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaraKhild%2Fspringboot-thymeleaf-crud-db-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaraKhild%2Fspringboot-thymeleaf-crud-db-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaraKhild%2Fspringboot-thymeleaf-crud-db-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaraKhild","download_url":"https://codeload.github.com/SaraKhild/springboot-thymeleaf-crud-db-deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922235,"owners_count":20855343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["alibabacloud","dockerfile","dokcer-compose","mysql","spring-boot","spring-jpa","terraform","thymeleaf"],"created_at":"2024-12-15T21:16:15.353Z","updated_at":"2026-05-11T03:07:08.756Z","avatar_url":"https://github.com/SaraKhild.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot \u0026 Thymeleaf: CRUD Operations with Database Integration and Deployment on Alibaba Cloud\n\n\u003cbr\u003e\n\n## Overview\nThis project focuses on managing an employee database through a user-friendly interface. It includes functionalities to:\n * Display a list of employees.\n * Add new employees to the database.\n * Update existing employee information.\n * Delete employees from the database. \u003cbr\u003e\n   \nThe project also incorporates cloud deployment using Alibaba Cloud. Infrastructure is provisioned and managed using Terraform, enabling scalable and efficient deployment of the application.\n  \n\u003cbr\u003e\n\n## Usages\n-  SpringBoot\n-  SpringJPA\n-  Thymeleaf\n-  MySQL\n-  Terraform\n-  Dockerfile\n-  Docekr Compose\n  \n## Architecture of the Project\n\n ### 1- deployment folders\n   - provider.tf\n   - vpc.tf\n   - key.tf\n   - bastion-sg.t\n   - bastion.tf\n   - employee-sg.tf\n   - employee.tf\n   - employee.tpl\n   - mysql-sg.tf\n   - mysql.tf\n   - mysql.tpl\n   - load-balancer.tf\n     \n ### 2- src folders\n ####  2.1 main \n   - Controllers folder\n   - Entities folder\n   - DAO folder\n   - Services folder\n#### 2.2 resources  \n##### 2.2.1 templates\n   - employee-form.html\n   - list-employees.html\n\n ### 2-Maven pom.xml\n\u003cbr\u003e\n\n```\n \u003cdependencies\u003e\n\n        \u003c!-- thymeleaf engin for html --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-starter-thymeleaf\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n\n        \u003c!-- spring mvc includs RES support --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-starter-web\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n\n        \u003c!-- dev tool for reload server automatic when change code --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-devtools\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n            \u003coptional\u003etrue\u003c/optional\u003e\n        \u003c/dependency\u003e\n\n        \u003c!-- mysql deriver --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003emysql\u003c/groupId\u003e\n            \u003cartifactId\u003emysql-connector-java\u003c/artifactId\u003e\n            \u003cscope\u003eruntime\u003c/scope\u003e\n        \u003c/dependency\u003e\n\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-starter-test\u003c/artifactId\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-starter-data-jpa\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n\n        \u003c!-- Hibernate --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.hibernate\u003c/groupId\u003e\n            \u003cartifactId\u003ehibernate-core\u003c/artifactId\u003e\n            \u003cversion\u003e${hibernate.version}\u003c/version\u003e\n        \u003c/dependency\u003e\n\n\u003c/dependencies\u003e\n ```\n\u003cbr\u003e\n\n### 3-Application.properties.yml\n\n```\nspring.datasource.url=jdbc:mysql://mydb:3306/demo\nspring.datasource.username=demouser\nspring.datasource.password=demopass\n\nspring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect\nspring.jpa.hibernate.ddl-auto=update  \n\n ```\n### 4- Dockerfile\n```\nFROM  openjdk:17\nWORKDIR /\nADD target/spring-boot-thymeleaf-crud-db-project-0.0.1-SNAPSHOT.jar /\nEXPOSE 8080\nENTRYPOINT [\"java\", \"-jar\", \"/spring-boot-thymeleaf-crud-db-project-0.0.1-SNAPSHOT.jar\"]\n\n```\n### 5- Docker-compose.yml\n```\nversion: \"3\"\nservices:\n  server:\n    container_name: app-container\n    image: app-image\n    build: .\n    restart: always\n    ports:\n      - 9091:8080\n    depends_on: \n      - mydb\n\n  mydb:\n    container_name: mydb\n    platform: linux/arm64/v8\n    image: mysql:latest\n    restart: always\n    ports:\n      - 3313:3306\n    environment:\n      MYSQL_DATABASE: demo\n      MYSQL_USER: demouser\n      MYSQL_PASSWORD: demopass\n      MYSQL_ROOT_PASSWORD: demopass\n```\n\n## Let's Start :mechanical_arm:\n### • Display Empoyees Table\n\u003cbr\u003e\n\u003cimg width=\"1674\" alt=\"display-employee\" src=\"https://user-images.githubusercontent.com/67427643/124305147-5d68ce80-db6d-11eb-8f44-e27b23c1645c.png\"\u003e\n\n\n\n### • Add new Employee\n\u003cbr\u003e\n\u003cimg width=\"1673\" alt=\"add-employee\" src=\"https://user-images.githubusercontent.com/67427643/124305371-ade02c00-db6d-11eb-866e-bb572312e91e.png\"\u003e\n\u003cimg width=\"1654\" alt=\"add-employee\" src=\"https://user-images.githubusercontent.com/67427643/124305516-e08a2480-db6d-11eb-8cff-08247c8a66fa.png\"\u003e\n\n\n\n### • Update Empoyee:\n\u003cbr\u003e\n\u003cimg width=\"1665\" alt=\"update-employee\" src=\"https://user-images.githubusercontent.com/67427643/124305561-f0a20400-db6d-11eb-91d8-e4c0c94f9a60.png\"\u003e\n\u003cimg width=\"1659\" alt=\"update-employee\" src=\"https://user-images.githubusercontent.com/67427643/124305710-1fb87580-db6e-11eb-9935-306d2030080e.png\"\u003e\n\n\n\n### • Delete Employee:\n\u003cbr\u003e\n\u003cimg width=\"1646\" alt=\"delete-employee\" src=\"https://user-images.githubusercontent.com/67427643/124306008-863d9380-db6e-11eb-9502-0cf65233b8a2.png\"\u003e\n\u003cimg width=\"1671\" alt=\"delete-employee\" src=\"https://user-images.githubusercontent.com/67427643/124306030-8b024780-db6e-11eb-8a2c-02ef02fc6e33.png\"\u003e\n\n---\n\n### Good Luck \u003cimg src=\"https://media.giphy.com/media/hvRJCLFzcasrR4ia7z/giphy.gif\" width=\"30px\"\u003e \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarakhild%2Fspringboot-thymeleaf-crud-db-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarakhild%2Fspringboot-thymeleaf-crud-db-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarakhild%2Fspringboot-thymeleaf-crud-db-deployment/lists"}