{"id":22191654,"url":"https://github.com/leosimoes/java-spring-vaadin-customer","last_synced_at":"2026-04-28T23:01:35.125Z","repository":{"id":237029763,"uuid":"793659329","full_name":"leosimoes/Java-Spring-Vaadin-Customer","owner":"leosimoes","description":"Project of a customer CRUD in Java language with Spring Framework and Vaadin.","archived":false,"fork":false,"pushed_at":"2024-05-06T00:34:40.000Z","size":814,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T01:16:37.335Z","etag":null,"topics":["java","spring","vaadin"],"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/leosimoes.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-04-29T16:21:41.000Z","updated_at":"2024-05-06T00:40:24.000Z","dependencies_parsed_at":"2024-05-06T01:44:36.586Z","dependency_job_id":null,"html_url":"https://github.com/leosimoes/Java-Spring-Vaadin-Customer","commit_stats":null,"previous_names":["leosimoes/java-spring-vaadin-customer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FJava-Spring-Vaadin-Customer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FJava-Spring-Vaadin-Customer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FJava-Spring-Vaadin-Customer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosimoes%2FJava-Spring-Vaadin-Customer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leosimoes","download_url":"https://codeload.github.com/leosimoes/Java-Spring-Vaadin-Customer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245351757,"owners_count":20601088,"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":["java","spring","vaadin"],"created_at":"2024-12-02T12:17:05.160Z","updated_at":"2026-04-28T23:01:30.082Z","avatar_url":"https://github.com/leosimoes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring and Vaadin - Customer\nAuthor: Leonardo Simões\n\n\n## Development steps\nThe project development steps were:\n\n1. Create project (in IntelliJ) with:\n- Java language (17);\n- Spring Framework (6.2.3);\n- Dependencies: Vaadin, JPA, H2, DevTools, Lombok.\n\n![Image-01-IntelliJ](images/Image-01-IntelliJ.png)\n\n2. Configure the H2 database:\n- In `build.gradle` configure according to the desired type of use:\n* `implementation 'com.h2database:h2'`;\n* `runtimeOnly 'com.h2database:h2'`;\n* `testImplementation 'com.h2database:h2'`;\n- In `application.properties`:\n\n```properties\n# ================================================================\n#                   APPLICATION\n# ================================================================\nspring.application.name=Java-Spring-Vaadin-Customer\n# ================================================================\n#                   DATASOURCE - H2 DATABASE\n# ================================================================\nspring.datasource.url=jdbc:h2:mem:proddb\nspring.datasource.driver-class-name=org.h2.Driver\nspring.datasource.username=leo\nspring.datasource.password=senha\nspring.h2.console.enabled=true\nspring.h2.console.path=/h2\n```\n\n![Image-02-Terminal-Run](images/Image-02-Terminal-Run.png)\n\n- test access to the H2 console at `http://localhost:8080/h2/`:\n\n![Image-03-B-ConsoleH2](images/Image-03-B-ConsoleH2.png)\n\nNote:\n- By default, the usename would be \"sa\" and the password \"\", and the h2 console would be disabled.\n\n4. Create `CustomerEntity` class:\n- in the `entities` package;\n- with attributes UUID id, String firstName, String lastName;\n- corresponding to the table named `CUSTOMERS`.\n\n![Image-04-CustomerEntity](images/Image-04-CustomerEntity.png)\n\n5. Create `CustomerRepository` interface:\n- in the `repositories` package;\n- annotated with `@Repository`;\n- extends `JPARepository`;\n- with methods:\n    * `Optional\u003cCustomerEntity\u003e findById(UUID id);`\n    * `Optional\u003cCustomerEntity\u003e findById(UUID id);`\n    * `List\u003cCustomerEntity\u003e findByFirstName(String firstName);`\n    * `List\u003cCustomerEntity\u003e findByLastName(String lastName);`\n    * `List\u003cCustomerEntity\u003e findByFirstNameAndLastName(String firstName, String lastName);`\n\n![Image-05-CustomerRepository](images/Image-05-CustomerRepository.png)\n\n6. Create `MainView` class:\n- in the `views` package;\n- annotated with `@Route(\"customers\")`;\n- extends `VerticalLayout`;\n- with a constructor annotated with `@Autowired` with a parameter (repository) and customize the screen inside it.\n\n![Image-06-Screen-01-Create](images/Image-06-Screen-01-Create.png)\n\n![Image-07-Screen-02-Create-Read](images/Image-07-Screen-02-Create-Read.png)\n\n\n## References\nSpring - Guides - Criando UI CRUD com Vaadin:\nhttps://spring.io/guides/gs/crud-with-vaadin","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleosimoes%2Fjava-spring-vaadin-customer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleosimoes%2Fjava-spring-vaadin-customer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleosimoes%2Fjava-spring-vaadin-customer/lists"}