Skip to content

Commit 1ba76d7

Browse files
joshiparthinKevinGilmore
authored andcommitted
Changes for mentioning db path... (eugenp#857)
1 parent b5c733d commit 1ba76d7

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎spring-mvc-xml/src/main/java/com/baeldung/spring/service/RawDBDemoGeoIPLocationService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class RawDBDemoGeoIPLocationService{
1313
private DatabaseReader dbReader;
1414

1515
public RawDBDemoGeoIPLocationService() throws IOException {
16-
File database = new File("C:\\Users\\Parth Joshi\\Desktop\\GeoLite2-City.mmdb\\GeoLite2-City.mmdb");
16+
File database = new File("your-path-to-db-file");
1717
dbReader = new DatabaseReader.Builder(database).build();
1818
}
1919

‎spring-mvc-xml/src/main/webapp/GeoIpTest.jsp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
<div id="status"></div>
7878

7979
<div id="map" style="height: 500px; width:100%; position:absolute"></div>
80-
<!--AIzaSyDDr65sVtJtlbliOTAeXyZSDPvG9NROjJA -->
81-
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA4vsDQWHeOrDnzS98XMXl5hgwA9raaQZ8"
80+
81+
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR-MAPS-API-KEY"
8282
async defer></script>
8383
</body>
8484
</html>

‎spring-mvc-xml/src/test/java/com/baeldung/geoip/GeoIpIntegrationTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public class GeoIpIntegrationTest {
1515

1616
@Test
1717
public void givenIP_whenFetchingCity_thenReturnsCityData() throws IOException, GeoIp2Exception {
18-
File database = new File("C:\\Users\\Parth Joshi\\Desktop\\GeoLite2-City.mmdb\\GeoLite2-City.mmdb");
18+
File database = new File("your-path-to-db-file");
1919
DatabaseReader dbReader = new DatabaseReader.Builder(database).build();
2020

21-
InetAddress ipAddress = InetAddress.getByName("202.47.112.9");
21+
InetAddress ipAddress = InetAddress.getByName("your-public-ip");
2222
CityResponse response = dbReader.city(ipAddress);
2323

2424
String countryName = response.getCountry().getName();

0 commit comments

Comments
 (0)