Skip to content

porcelani/microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crud Microservices

Goal

Create a code sample with:

  • Rest application (SpringBoot);
  • Microservices architecture;
  • Database Connection;
  • Docker

Rules implementation

Password security scanner(http://passwordmeter.com); I will try create a simple resource, Passwords, that receive a character to analyze and persist.

Stack

Overview +

alt tag

Run

With Docker
 cd ../microservices
 mvn clean install
 docker-compose up

With Vagrant
 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"
}

Others URLs

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

References

TODO

  • 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;
  • [] ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published