Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

WeatherProject

Logo

This is a basic weather project where we pass a pincode and the date and it will return the weather details like rain,clouds,temp,min_temp,max_temp,feel-Like,sunset,sunrise,etc-etc. there is only one user : user who can search weather for particular location.

ER Diagram

ER diagrame /view)

Features

  • user can search weather details for particular location and particular date, project will return weather details for that locations

API Reference

for getting lattitude , longitude and some other locartion details

https://api.opencagedata.com/geocode/v1/json?key={api_ley}&q={pincode}&pretty=1

ParameterTypeDescription
api_keystringRequired. 767d0ceffae94717836eadb18dee640a
pincodeIntegerwhich you want to search

it takes pincode as parameter and return pincode details..........

for getting weather details

https://api.openweathermap.org/data/2.5/weather?lat={lattitude}&lon={longitude}&dt={unixTime}&appid={your api key}&units=metric

ParameterTypeDescription
appidstringRequired.956df4d89fd7e25fc00ccab4ae566c5d
dtLongunixtime
londoublelongitude
latdoublelattitude

it takes lngotude and lattitude and unixtime as parameter and return JsonObject of weather details...............

Tech Stack

  • Core Java
  • Spring Boot
  • Hibernate
  • MySQL (RDBMS)
  • Sql
  • Maven
  • Swagger UI
  • postman
  • Intellij Idea
  • Giuhub

Deployment

To deploy this project on localhost paste this below code in application.properties file in the resources and update according to your database name, username and password of your MySQL database.

#changing the server portserver.port=8080
#db specific propertiesspring.datasource.url=jdbc:mysql://localhost:3306/database
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=username
spring.datasource.password=password
#ORM s/w specific propertiesspring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.mvc.throw-exception-if-no-handler-found=true
spring.web.resources.add-mappings=false
spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER

Swagger UI - Link

Use this link to run it on browser.

http://localhost:8080/swagger-ui

Authors

About

This is a basic weather project and it is a indcidual project In this project user can find the weather for particular location by pincode and date when user pass the pincode and date project will return the weather details like - temperature , min_temperaturee, max_temperature, wind details, sunrise, sunset etc. In this project I use java.........

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages