简体   繁体   中英

How to implement django-like management commands in Tapestry5 app?

I want to executie custom (groovy/clojure/java/whatever) "scripts" as command line commands to do some tasks with Tapestry5 app (it's hibernate part, really). To perform a migration from previous database to the new one, for example. I wonder if there is a way to use "tapestrified" entities?

I've tried to implement this using gradle tasks, separate clojure scripts (with maven plugin inside main pom file), but it seems that they do not have access to hibernate session, so i can't really do something with database.

I'm very new to java world (i have some expirience with clojure and a very little expirience with scala), so maybe i'm missing something about "enterprise" tools.

The question is: is there an "official" way to accomplish such tasks?

Do you mean database changelogs? If so then you do not need to use tapestry or hibernate. You can look at http://www.liquibase.org/ or google something similar.

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