Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josueec/api-rest-todo
📋 Basic example of REST API.
https://github.com/josueec/api-rest-todo
hibernate java jpa postgresql spring-boot
Last synced: 6 days ago
JSON representation
📋 Basic example of REST API.
- Host: GitHub
- URL: https://github.com/josueec/api-rest-todo
- Owner: JosueEC
- Created: 2023-05-01T18:18:14.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-05-01T23:25:20.000Z (over 1 year ago)
- Last Synced: 2024-11-08T23:49:34.095Z (6 days ago)
- Topics: hibernate, java, jpa, postgresql, spring-boot
- Language: Java
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Example API REST with JAVA, SPRING-BOOT, JPA and MYSQL
1.- Crear nuestro proyecto con springboot initializer,
agregando las dependencias:
* Spring Web
* JPA
* MySQL Driver2.-Creamos nuestra division de carpetas en src
* Controllers
* Models
* Repositorys3.-Creamos nuestros controllers usando la etiqueta
@RestController4.-Establecemos los endpoints de nuestra API usando
las etiquetas:
* @GetMapping(value = "" )
* @PostMapping(value = "" )
* @DeleteMapping(value = "" )
* @PutMapping(value = "" ) / @PatchMapping(value = "" )5.-Creamos las entidades de nuestro proyecto, esto lo
hacemos con JPA, usando las etiquetas que nos proporciona:
* @Entity
* @Id
* @Column
* etc