Sistema para gerenciar mercadorias e notas fiscais. Backend desenvolvido em Java e Frontend desenvolvido em AngularJS.
A documentação do desafio pode ser encontrada em DevJavaSenior.pdf.
As telas (frontend) podem ser visualizadas em:
- ScreenShot-1.png
- ScreenShot-2.png
- ScreenShot-3.png
- ScreenShot-4.png
- ScreenShot-5.png
- ScreenShot-5.png
- Java 1.8
- AngularJS
- Spring Boot 1.4
- Maven 3.3.9
- JPA
- HSQLDB
- JMS
- ActiveMQ
- JUnit
$ mvn test
$ mvn spring-boot:run
Exemplo de requisição:
- GET http://localhost:8080/api/products
- Accept: application/json
- Content-Type: application/json
Exemplo de resposta:
- 200 OK
{
"content": [
{
"id": 1,
"name": "iPhone 6S 16GB",
"price": 2799
},
{
"id": 2,
"name": "iPad Mini 64GB",
"price": 3700
},
{
"id": 3,
"name": "Moto X Style 32GB",
"price": 2199
},
{
"id": 4,
"name": "Galaxy S6",
"price": 1799
}
],
"last": true,
"totalPages": 1,
"totalElements": 4,
"size": 20,
"number": 0,
"sort": null,
"numberOfElements": 4,
"first": true
}
Exemplo de requisição:
- GET http://localhost:8080/api/products/{id}
- Accept: application/json
- Content-Type: application/json
Exemplo de resposta:
- 200 OK
{
"id": 1,
"name": "iPhone 6S 16GB",
"price": 2799
}
Exemplo de requisição:
- GET http://localhost:8080/api/invoices
- Accept: application/json
- Content-Type: application/json
Exemplo de resposta:
- 200 OK
{
"content": [
{
"id": 1,
"company": {
"id": 1,
"name": "Apple"
},
"customer": "John Doe",
"description": "Invoice description",
"items": [
{
"id": 1,
"product": {
"id": 1,
"name": "iPhone 6S 16GB",
"price": 2799
},
"quantity": 1,
"totalPrice": 2799
},
{
"id": 2,
"product": {
"id": 2,
"name": "iPad Mini 64GB",
"price": 3700
},
"quantity": 1,
"totalPrice": 3700
}
],
"totalPrice": 6499
},
{
"id": 2,
"company": {
"id": 1,
"name": "Apple"
},
"customer": "John Doe",
"description": "Invoice description",
"items": [
{
"id": 3,
"product": {
"id": 3,
"name": "Moto X Style 32GB",
"price": 2199
},
"quantity": 2,
"totalPrice": 4398
}
],
"totalPrice": 4398
}
],
"last": true,
"totalPages": 1,
"totalElements": 2,
"size": 20,
"number": 0,
"sort": null,
"numberOfElements": 2,
"first": true
}
Exemplo de requisição:
- GET http://localhost:8080/api/invoices/{id}
- Accept: application/json
- Content-Type: application/json
Exemplo de resposta:
- 200 OK
{
"id": 1,
"company": {
"id": 1,
"name": "Apple"
},
"customer": "John Doe",
"description": "Invoice description",
"items": [
{
"id": 1,
"product": {
"id": 1,
"name": "iPhone 6S 16GB",
"price": 2799
},
"quantity": 1,
"totalPrice": 2799
},
{
"id": 2,
"product": {
"id": 2,
"name": "iPad Mini 64GB",
"price": 3700
},
"quantity": 1,
"totalPrice": 3700
}
],
"totalPrice": 6499
}