This library streamlines the use of the Google Places API in combination with Spring Boot. So you don't have to struggle with building clever requests to the API and then painstakingly integrating that again into the Spring environment.
ℹ️ If an error occurs during compilation or runtime and you don't know why, you can check the following link to see how to fix it.
This is a step-by-step guide on how to work with this repository and what preparation is needed to generally communicate with the Google Places API.
To work with this repository, it must be added to your project. There are several ways to do this, but the easiest way is to use a software project management and comprehension tool. You can add the library to your project via Maven or Gradle.
<dependency>
<groupId>net.plyse</groupId>
<artifactId>google-places-api</artifactId>
<version>0.1.2</version>
</dependency>
repositories {
mavenCentral()
}
dependencies {
implementation 'net.plyse:google-places-api:0.1.2'
}
If you use another building tool which is not listed here or you want to use another version you can check the following link.
In order to make an API request to Google, you need an API key, which you can create here. How exactly to create an API key is described on the official website of Google.
Once you have a valid API key, you need to add it to the project. To do this, create a file named config.properties under /src/main/resources/
in which the API key is stored. Then you only have to add the API-Key to the file as follows (YOUR_API_KEY
stands for your API-Key).
google.api.places.api-key=YOUR_API_KEY
ℹ️ If the API key is not valid, then Java throws an
IllegalApiKeyException
, which indicates that the specified API key is no longer valid.
This library is built on top of two common libraries and also designed to work with any HTTP service on the web:
View the javadoc.
This repository is distributed under the terms of the Apache License Version 2.0. A complete version of the license is available in the LICENSE file in this repository. Any contribution made to this project will be licensed under the Apache License Version 2.0.