donbeave-archive / grails-geoip Goto Github PK
View Code? Open in Web Editor NEWGrails GeoIP Plugin (based on MaxMind library)
License: GNU Lesser General Public License v2.1
Grails GeoIP Plugin (based on MaxMind library)
License: GNU Lesser General Public License v2.1
would like to request the following be added to geoipservice:
static transactional = false
Since it doesn't update the db
I got this error when running version 0.3
Configuring MaxMind GeoIP ...
ERROR: GeoIP data file not installed.
I'm developing a plugin that provides custom mapping functions - used by a few of our client apps. I've tried adding this plugin to my plugin (data file gets successfully copied into its web-app/data/maxmind/
dir) yet it can't find the GeoLiteCity.dat
file when the app runs (via grails run-app
and plugin running "in-place"). I've got a defaultConfig.groovy
file in my plugin that gets merged into my client app config
and when I set:
grails.plugin.geoip.data.resource = '/data/maxmind/GeoLiteCity.dat'
I get a message:
java.io.FileNotFoundException: /Users/xxxxx/github/my-app/web-app/data/maxmind/GeoLiteCity.dat (No such file or directory)
Due to the fact the dat
file is in my plugin's web-app
and not my client app's web-app
(where it is looking).
If I run run-war
I get a different error:
java.io.FileNotFoundException: /Users/xxxxx/github/my-app/target/work/tomcat/webapps/my-app/data/maxmind/GeoLiteCity.dat
Note my-app
appears twice in the path.
If I set an absolute path for grails.plugin.geoip.data.path
on my machine it works but I need this to work relative to my plugin, in any of my client apps.
How can I configure the plugin so it looks for the dat
file in my plugin web-app directory and not in the client app's version?
This block of code sometimes grabs things like the message(...) method built into grails, causing it to crash when used in controllers. Suggest not throwing MissingMethodException if the method doesn't start with 'isIn' (remove the else block completely)
klass.metaClass.methodMissing = { String methodName, args ->
if (methodName.startsWith('isIn')) {
.... your code ...
} else {
throw new MissingMethodException(methodName, delegate, args)
}
}
I am working on upgrading an application from 2.3.11 to 2.4.4
I have integration tests that use GeoIP.
When running integration tests, application.parentContext
is null, so loading the resource fails. When running the application itself, it is not null.
I am configuring the data file location using grails.plugin.geoip.data.resource=classpath:/geoip/GeoLiteCity.dat
, although the default configuration and data file location also fail.
By the time the code in the integration spec is executed, the parent context is in place.
I haven't figured out exactly what changed with Grails 2.4, or how to work around it yet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.