Generator for Angular/Spring Boot/MarkLogic apps
This is similar to slush-marklogic-node (and the creators of that project did all the hard work, making it easy to create this project), but it's intended for MarkLogic users that prefer a Java middle tier (Spring Boot) instead of NodeJS. The Angular UI is largely the same (along with using bower/gulp/npm), and Gradle is the build tool instead of Roxy, though you can always use Maven to invoke Gradle too.
To install and use slush-marklogic-spring-boot, you need a few things installed locally first (unless otherwise noted, install the latest version of each):
$ npm install -g slush-marklogic-spring-boot
Create a new folder for your project:
$ mkdir my-app
Run the generator from within the new folder:
$ cd my-app && slush marklogic-spring-boot
As of version 0.1.x, the generator will install Bower and Node dependencies for you. It doesn't yet deploy the MarkLogic application or build the webapp. It also assumes that your admin username/password is admin/admin. If you need to modify that, first do so in the gradle.properties file. Then run these commands (note that 0.1.x doesn't have the Gradle wrapper yet either):
gradle mlDeploy gulp build
Once you've run those, you can launch Spring Boot via the command line:
Or, since you have a Java middle tier, you'll probably want to load the project into an IDE like Eclipse and run Spring Boot from there:
And then import the project and run "org.example.App".
This is a 3 tier architecture - Angular, Spring Boot, and MarkLogic - and thus, during development, there are 3 things you'll want to update and test, ideally without having to run a build task manually. Here's the best way to do that, IMO:
According to the Boot docs, you should be able to change Java code, and Boot will reload if you have Boot's devtools library on the classpath. I have not had good luck with that yet. But changing Java code is infrequent, and so far, it's not a big deal to just re-run this task after changing Java code.
I have had luck with Boot restarting when running Boot in Eclipse, but it restarts more often than I want it to - I haven't looked into trying to configure when it should restart and when it should not.
For now, I'd stick with "gradle bootRun" from the command line.
As of version 0.4.0, an Esri-based map is included in the UI, along with some code in the modules database to support it. If you don't want this map, the easiest thing to do is comment it out in search.html and then comment out the related parts in search.controller.js. Also comment out the Esri JS/CSS files in index.html. That will prevent the app from doing any unnecessary work to try to power a map that you don't want.
Slush is a tool that uses Gulp for project scaffolding.
Slush does not contain anything "out of the box", except the ability to locate installed slush generators and to run them with liftoff.
To find out more about Slush, check out the documentation.
See the CONTRIBUTING Guidelines
If you have any problem or suggestion please open an issue here.
The MIT License
Copyright (c) 2016, Rob Rudin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.