简体   繁体   中英

Command “web mvc geo controller…” on Spring Roo not Running

I have been experimenting with Spring Roo lately and was interested in seeing how to build GeoApplications with the gvnix roo addon. I am following the tutorial found here .

I follow all the steps, but when I reach the section for "Generate Map View" roo seems to not respond to the command given in the tutorial. Am using Postgres 9.3, gvNIX 1.5.1.RC4 distribution 1.3.2.RELEASE [rev d18aef8]. My log.roo is as follows:

    project --topLevelPackage com.petclinic --projectName petclinic --java 7 --packaging JAR
// Spring Roo 1.3.2.RELEASE [rev d18aef8] log closed at 2016-01-06 22:04:30
// Spring Roo 1.3.2.RELEASE [rev d18aef8] log opened at 2016-01-06 22:05:34

osgi start --url file:////home/tumaini/.m2/repository/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar

jpa setup --database POSTGRES --provider HIBERNATE --databaseName petclinic --hostName localhost --userName postgres --password jej3bimt
database introspect --schema public
database reverse engineer --schema public --package ~.domain
jpa geo setup --provider HIBERNATE_SPATIAL
field geo --fieldName location --type POINT --class ~.domain.Owner
field geo --fieldName distance --type LINESTRING --class ~.domain.Owner
field geo --fieldName area --type POLYGON --class ~.domain.Owner
finder geo all
web mvc geo controller --class ~.web.MapViewerController --preferredMapping mapview --projection EPSG4326

It is on this last roo command where I get the error

Command 'web mvc geo controller --class ~.web.MapViewerController --preferredMapping mapview --projection EPSG4326' was found but is not currently available (type 'help' then ENTER to learn about this command)
~.domain.Owner roo-gvNIX> 

The postgres database (a very small one for tutorials purpose) can be restored from the backup file found at http://github.com/kilimba/tmarc/blob/master/petclinic.backup .

Thanks

Since gvNIX 1.5 geo views use the fancytree addon of gvNIX for showing the TOC. Before using command web mvc geo controller you need to use web mvc fancytree setup to install that TOC dependency.

That dependency is described in gvNIX reference guide , but not in the quickstart guide which you are following, so it should be updated .

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM