Create a code sample with:
- Rest application (SpringBoot);
- Microservices architecture;
- Database Connection;
- Docker
Password security scanner(http://passwordmeter.com); I will try create a simple resource, Passwords, that receive a character to analyze and persist.
- Java
- Maven
- Spring Cloud Netflix
- Spring Boot Admin
- Cassandra
- Junit
- REST-assured
- Mockito
- Docker
Overview +
cd ../microservices
mvn clean install
docker-compose up
cd ../microservices/vagrant
vagrant up
After some minutes, you can visit the client directly at http://localhost:8080/edge/passwords The endpoint will show the passwords saved in Cassandra;
[]
You can create some register in Cassandra;
curl \
-H "Content-Type: application/json" \
-X POST \
-d 'simplePassword' \
http://localhost:8080/edge/passwords
This will be return:
{
"passwordCharacters":"simplePassword",
"score":48,
"complexity":"Good"
}
Service Name | Docker Name | URL |
---|---|---|
SpringBootAdmin | admin | http://localhost:8762 |
Eureka | eureka | http://localhost:8761 |
Server Config | config | http://localhost:8888/APPLICATION/PROFILE |
Zuul | zuul | http://localhost:8080/APPLICATION/RESOURCE |
Edge | edge | http://localhost:8070 |
Middle | middle | http://localhost:8090 |
Cassandra | cassandra | tcp://localhost:9042 |
-
https://spring.io/guides/gs/service-registration-and-discovery/
-
https://cloud.spring.io/spring-cloud-config/spring-cloud-config.html
-
https://github.com/materasystems/crud-microservices/
-
https://github.com/andreariano/messageexchange-app
-
https://github.com/mcwumbly/spring-boot-eureka-example.git
-
http://docs.spring.io/spring-data/cassandra/docs/1.5.1.RELEASE/reference/html/
- Finish simple Passwords Resource;
- Save Password in Cassandra;
- Finish Simple Tests;
- Finish docker-compose configuration;
- Connected zuul -> edge -> middle;
- [] Finish some rules;
- [] Include Javadoc;
- [] Fix Server Config;
- [] Use core module;
- [] Cassandra embedded to simple service automation test;
- [] Fix SpringBootAdmin Details;
- [] Include Hystrix (https://exampledriven.wordpress.com/2016/07/05/spring-cloud-hystrix-example/);
- [] Eureka + SpringBootAdmin;
- [] WireMock can Simplify some Integrations Tests;
- [] ...