Notes- Food Delivery Applications with Microservices & AWS
- Anand Nerurkar
- Apr 9, 2024
- 1 min read
Updated: Apr 13, 2024
create Eureka service
create Restaurent service
-add depednecy below
spring web
eureka client
jpa
h2
lombok
mapstrcut- dto-entity mapping
add plugin for mapstruct to generate classes
we normally do not expose entity directly to client , so we make use of DTO, by using mapper, we do provide dto-entity, entity to dto conversion.
-------------------------application.properties------------------------ spring.application.name=restaurent-service server.port=9091 spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password=password spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.hibernate-ddl-auto=update spring.jpa.show-sql = true spring.eureka.client.service-url.defaultZone =http://localhost:8761/eureka/
API Testing Result a. Save Restaurent-POST Mapping Request/Response
b.FetchAll--- /restaurents -------GET
c. fetchById- GET
Food Catalog Service
Post- Add Food ITem
GET- FOODTEM/RESTAURENTID
hhhhhhhhhhhhHHHHHH
hhhhhhhhhhhHHHHHH
hhhhhhhhhhhHHHHHHHHH
Comments