https://github.com/davidgfolch/shop
Customer & order management
https://github.com/davidgfolch/shop
functional-programming generics gradle-multi-project hexagonal-architecture java-8 junit5 lombok mockito rest-api sonarqube spring-boot-2 spring-boot-data-jpa spring-boot-starter-test swagger2 transactional
Last synced: 2 months ago
JSON representation
Customer & order management
- Host: GitHub
- URL: https://github.com/davidgfolch/shop
- Owner: davidgfolch
- Created: 2020-02-20T17:20:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T18:37:43.000Z (about 5 years ago)
- Last Synced: 2025-01-23T05:45:38.174Z (4 months ago)
- Topics: functional-programming, generics, gradle-multi-project, hexagonal-architecture, java-8, junit5, lombok, mockito, rest-api, sonarqube, spring-boot-2, spring-boot-data-jpa, spring-boot-starter-test, swagger2, transactional
- Language: Java
- Size: 136 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shop
[](https://travis-ci.com/davidgfolch/shop)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)
[](https://sonarcloud.io/dashboard?id=13814eaa9b43ba5e25d2df7d0f0130c37635a8de)Hexagonal architecture approach.
Gradle multi module Spring-boot project.
Sonar plugin enabled.
Swagger2 configuration enabled.
H2 in memory persistence.
## Testing
JUnit / mockito
## Lombok
Enable annotation processing in IDE
Intellij install lombok plugin.
## Run
Run the Spring Boot Application in restApi module.
You can try it with Swagger-ui accessing http://localhost:8080/swagger-ui.html
## Swagger
Create product:{
"name": "Product1",
"price": 10
}Create order:
{
"customerEmail": "[email protected]",
"products": [
1
]
}
## Considerations
- You do not need to add authentication to your web service, but propose a protocol / method and
justify your choice.
- Use of HTTPS.
- Password hash.
- Basic auth or OAuth.
- How can you make the service redundant? What considerations should you do?
- Decoupling restApi, service, port and adapter from spring boot dependency management and communicate them via async or sync protocols/frameworks, for example, this [spring-cloud+kubernetes](https://dzone.com/articles/quick-guide-to-microservices-with-kubernetes-sprin) solution.## Travis
### Sonarqube
Generate encrypted key
travis login --pro
travis encrypt --pro 7abce0510365e6f776e1f6b95727245001c43113
copy to .travis.ymlFollow instruccions in https://sonarcloud.io