- maven
- java 15
- make
- docker
- aws cli
- terraform
See Makefile
perfil Admin:
username: [email protected]
password: 123
perfil Cliente:
username: [email protected]
password: 123
perfil Cadastrador:
username: [email protected]
password: 123
clientId: food-web
clientSecret: web123
POST:
https://food-api-rfaguiar.herokuapp.com/oauth/token
Headers:
Content-Type: application/x-www-form-urlencoded
Authorization: Basic Zm9vZC13ZWI6d2ViMTIz
Body:
username=[email protected]&password=123&grant_type=password
clientId: faturamento
clientSecret: faturamento123
POST:
https://food-api-rfaguiar.herokuapp.com/oauth/token
Headers:
Content-Type: application/x-www-form-urlencoded
Authorization: Basic ZmF0dXJhbWVudG86ZmF0dXJhbWVudG8xMjM=
Body:
grant_type=client_credentials
clientId: food-analytics
clientSecret: food123
POST:
https://food-api-rfaguiar.herokuapp.com/oauth/token
Headers:
Content-Type: application/x-www-form-urlencoded
Authorization: Basic Zm9vZC1hbmFseXRpY3M6Zm9vZDEyMw==
Body:
grant_type=authorization_code&redirect_uri=http://localhost:8082&code={substituir por codigo}
clientId: food-analytics
clientSecret: food123
Code Verifier: teste123
Code Challenge: teste123
Obs mudar o method para s256 (SHA-256)
https://food-api-rfaguiar.herokuapp.com/oauth/authorize?response_type=code&client_id=food-analytics&state=abc&redirect_uri=http://localhost:8082&code_challeng_method=plain&code_challeng=teste123
sha-256 https://tonyxu-io.github.io/pkce-generator/
Code Verifier: teste123
Code Challenge com base64 e sha256 base64url(sha256(teste123)): KJFg2w2fOfmuF1TE7JwW-QtQ4y4JxftUga5kKz09GjY
https://food-api-rfaguiar.herokuapp.com/oauth/authorize?response_type=code&client_id=food-analytics&state=abc&redirect_uri=http://localhost:8082&code_challeng_method=s256&code_challeng=KJFg2w2fOfmuF1TE7JwW-QtQ4y4JxftUga5kKz09GjY
POST:
https://food-api-rfaguiar.herokuapp.com/oauth/token
Headers:
Content-Type: application/x-www-form-urlencoded
Authorization: Basic Zm9vZC1hbmFseXRpY3M6Zm9vZDEyMw==
Body:
grant_type=authorization_code&redirect_uri=http://localhost:8082&code=kUSmN8er&code_verifier=teste123
docker run --rm --name mysql8 --network minha-rede -v $(pwd)/mysql-datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -p 3306:3306 -d mysql:8
DB_URL DB_USER DB_PASS
S3_CHAVE_ACESSO S3_CHAVE_SECRETA S3_BUCKET_NAME S3_BUCKET_REGIAO S3_BUCKET_DIRETORIO
EMAIL_IMPL=SMTP MAIL_HOST MAIL_PORT MAIL_USER MAIL_PASSWORD MAIL_REMETENTE
JKS_BASE64 KEYSTORE_PASSWORD KEYSTORE_ALIAS
before configure aws cli:
aws configure
- Terraform change values terraform.tfvars set and terraform env vars
TF_VAR_db_username TF_VAR_db_password TF_VAR_db_username TF_VAR_db_password TF_VAR_jks_alias TF_VAR_jks_base64 TF_VAR_jks_password TF_VAR_mail_host TF_VAR_mail_password TF_VAR_mail_port TF_VAR_mail_remetente TF_VAR_mail_user TF_VAR_domain_name
cd terraform && terraform init && terraform apply
terraform output db_hostname
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Data JPA
- Validation
- Java Mail Sender
- Apache Freemarker
- Spring Configuration Processor
- Flyway Migration
- Spring Boot DevTools
- Spring HATEOAS
- Spring Security
- Jaspersoft JasperReports
- AWS SDK for Java
- K8S Minikube
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
- Accessing Data with JPA
- Building a Hypermedia-Driven RESTful Web Service
- Securing a Web Application
- Spring Boot and OAuth2
keytool -genkeypair -alias food -keyalg RSA -keypass 123@foodprd \
-keystore food-prd.jks -storepass 123@foodprd -validity 3650
cat food-prd.jks | base64 | pbcopy
export $(xargs < .env)
aws ecs describe-tasks --cluster food-cluster --tasks a70cb56183564ce690c39b1a178bc417