https://github.com/marcosstefani/weatherdb
Example code developed with Spring Boot using RestFul and database mapping
https://github.com/marcosstefani/weatherdb
Last synced: about 2 months ago
JSON representation
Example code developed with Spring Boot using RestFul and database mapping
- Host: GitHub
- URL: https://github.com/marcosstefani/weatherdb
- Owner: marcosstefani
- Created: 2018-11-17T14:51:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-19T10:06:49.000Z (over 6 years ago)
- Last Synced: 2025-02-13T03:25:55.191Z (4 months ago)
- Language: Java
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# weatherdb
Example code developed with Spring Boot using RestFul and database mappingThe messaging service used was RabbitMQ, I installed it in a local Docker that can be accessed by the address http://localhost:32784
## WeatherConsumer
@Component: The consumer must be a bean mapped in Spring, so annotated as a component;
@RabbitListener: It is the annotation that marks the method as a listener;
@Payload: It is the annotation that informs that the parameter will receive the body of the message. Note: This is not required when you have only one parameter.## WeatherQueueSender
RabbitTemplate: It is a helper class to synchronously access and send messages to RabbitMQ;
Queue: An object representing the configured queue;
rabbitTemplate.convertAndSend: Method has received the parameters: routingKey and message, where are the name of the file and the message to be sent.## ForecastController
10 minutes cache for the getFromService method