Changes for mentioning db path... (#857)

This commit is contained in:
Parth Joshi 2016-11-23 09:41:02 +05:30 committed by KevinGilmore
parent b5c733df47
commit 1ba76d72f0
3 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ public class RawDBDemoGeoIPLocationService{
private DatabaseReader dbReader;
public RawDBDemoGeoIPLocationService() throws IOException {
File database = new File("C:\\Users\\Parth Joshi\\Desktop\\GeoLite2-City.mmdb\\GeoLite2-City.mmdb");
File database = new File("your-path-to-db-file");
dbReader = new DatabaseReader.Builder(database).build();
}

View File

@ -77,8 +77,8 @@
<div id="status"></div>
<div id="map" style="height: 500px; width:100%; position:absolute"></div>
<!--AIzaSyDDr65sVtJtlbliOTAeXyZSDPvG9NROjJA -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA4vsDQWHeOrDnzS98XMXl5hgwA9raaQZ8"
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR-MAPS-API-KEY"
async defer></script>
</body>
</html>

View File

@ -15,10 +15,10 @@ public class GeoIpIntegrationTest {
@Test
public void givenIP_whenFetchingCity_thenReturnsCityData() throws IOException, GeoIp2Exception {
File database = new File("C:\\Users\\Parth Joshi\\Desktop\\GeoLite2-City.mmdb\\GeoLite2-City.mmdb");
File database = new File("your-path-to-db-file");
DatabaseReader dbReader = new DatabaseReader.Builder(database).build();
InetAddress ipAddress = InetAddress.getByName("202.47.112.9");
InetAddress ipAddress = InetAddress.getByName("your-public-ip");
CityResponse response = dbReader.city(ipAddress);
String countryName = response.getCountry().getName();