Projeto do curso Descomplicando Java e Spring da LinuxTips
./mvnw spring-boot:run
- Lombok
- MapStruct
- H2
- Java 19
Rest/Restful architecture - HTTP - POST, GET, PUT, DELETE - CRUD.
Method | route | Description |
---|---|---|
POST |
localhost:8080/v1/estudantes | Create a new student |
Example:
[
{
"nome": "Ayrton",
"endereco": "Lapa",
"curso" : "Descomplicando SQL",
"dadosBancarios" : {
"agencia" : 123,
"conta" : 4568,
"digito": 3,
"tipoContaBancaria": "POUPANCA"
}
}
]
Method | route | Description |
---|---|---|
GET |
localhost:8080/v1/estudantes | List all students |
GET |
localhost:8080/v1/estudantes/{id} | List a student by Id |
GET |
localhost:8080/v1/estudantes/nome/{name} | List a student by name |
GET |
localhost:8080/v1/estudantes/nome?nome={name} | List all students that name contains a given string |
GET |
localhost:8080/v1/estudantes/curso?curso={name} | List all students by course |
Method | route | Description |
---|---|---|
PUT |
localhost:8080/v1/estudantes/{id} | Upate a student |
Method | route | Description |
---|---|---|
DELETE |
localhost:8080/v1/estudantes/{id} | Delete a student |