Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
When submitting request from frontend , cors issue is getting triggered although it can be resolved if in the ResourceServerConfig.java you can add Cors configurationSource bean and in http.cors() and also in the api gateway class add CorsFilter class and annotate it as @component. After doing this for catalog product service we no longer get cors policy issue but the same code is not working when we call signup service as we get error Request header field authorization is not allowed by Access-Control-Allow-Headers , although we have added the said Authorization headers in cors configuration , but when account/oauth/token api is called at time of registering user we get the error
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in I:\Online Book Store App\BookStoreApp-Distributed-Application\bookstore-frontend-react-app\node_modules\postcss-safe-parser\node_modules\postcss\package.json
at new NodeError (node:internal/errors:399:5)
at exportsNotFound (node:internal/modules/esm/resolve:361:10)
Everytime I try to start the services in Docker, it says "Error in plugin: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?filters=%7B%22status%22%3A%7B%22running%22%3Atrue%7D%7D&limit=0": dial unix /var/run/docker.sock: connect: permission denied"
when we are are going to run this project few time project all services work properly but few time only show logo backend data not working like product page ,signup ,etc//..all services not working..what a issue .please solve it.because not show any error in your project
Hi Devaraj, I am trying to deploy application into AWS by following your AWS architectural diagram. I have a few questions,
I understand that microservices are deployed into ECS into private subnet but how is Eureka discovery and Zuul deployed into public subnet? Are they deployed on EC2 using BeanStalk or any other offering? And I assume they are running on two different EC2 instances, If you can clarify please?
Why have you suggested to have an NGINX between React front end and Zuul gateway? Also is NGINX running on a separate EC2 instance?
Have you already created this architecture on AWS cloud which I can refer to? or get a cloud formation file?