Generating offline documentation for Spring projects - spring-cloud

As part of familiarizing myself with the gauntlet of frameworks and functionalities provided by Spring, I often download their PDF documentation to read offline. For instance, the core Spring Framework documentation is over 900 pages.
However, I noticed that there are quite a few top-level Spring projects that don't have their equivalent offline/PDF documentation. Full list:
Spring Cloud
Spring Social
Spring LDAP
Spring Session
Spring Flo
I remembered reading somewhere that Spring uses AsciiDoctor to generate their documentation. So, my question is, what is the fastest way one can one go about converting the "htmlsingle" or "html5" online documentation to PDFs for offline viewing?

Using the normal Ctrl + P and then Save as PDF in Chrome renders the webpage for Spring Cloud as a proper PDF, in the same format/layout as the "official" PDF docs for the other Spring projects.
Thanks to Github user https://github.com/dsyer for providing the hint on the Spring Cloud Gitter.

Related

Need your advice to choose between Pentaho and Spring batch?

I'm developing a java web application with Spring framework. And the main idea is to develop an ETL (for Extract , Transform,Load ) which extracts data from different databases and then load them in the same database.
I did a research , I found that Pentaho has a java API which let me do that work also it's a BI solution ,But documentation is too poor.
I'm used to using Spring batch and Here I'm not able to know the difference between them. Because Spring batch also let me do reading data from databases, process them and then store them.
Is the spring batch solution an ETL ??
Is pentaho more powerful or what shall I choose ?
Thanks in advance :)

Neo4j with Spring using remote Neo4j-Server

I want to build a RESTful Application with Spring using Neo4j as a Database.
What I (very simply) want to have, is an application that takes entities (like a user) via POST, persists them in a Neo4j Database and loads them on a GET.
I tried the spring tutorials (build an embedded graphdb and also accessing an external graphdb via rest) for that and it worked, but it seems that i can't use the neo4j standalone to view the database live, because it seems to be locked by my application.
It is important for me to have some kind of method to view the live database, so I'm stuck.
So basically I'm looking for a simple way to have an application writing to and reading from an external graphdb, which I can manipulate with the neo4j standalone (or some alternative program).
I' asking here, because at this point I don't even know what to goole anymore :)
There are two options: http://neo4j.com/developer/spring-data-neo4j
1) with Spring Data Neo4j version 4 you can work against Neo4j server
2) with Spring Data Neo4j 3, you can move your code into a server extension
3) there is also an option to start Neo4j server with an embedded database (this should only be done during development not production)
Thanks to your answers, I have some examples that show me the intended use of Neo4j which helps me a lot.
Basically github.com/neo4j-examples?utf8=%E2%9C%93&query=sdn4 was the answer to all my questions, since it provides me with a useful "look how it's done".
Thank you.

How to submit Hive Jobs programmatically from JSP

We are trying to build a wrapper system for business users and we want to explore option of building a capability to submit the HIVE query from a JSP page. I could not find a best example or suggested mechanism for this. Anyone tried this before? If so can someone share their best ideas? We are looking for the REST API mechanism. If that wont work, then we can use java from JSP servlets.
Appreciate your support.
Kiran
You can use JDBC. I dont think there is a REST API for Hive.
But since most developers & application typically use JDBC this should be the preferred mode.
More details can be found here (Assuming you are using latest Hive versions) : Hive 2 Clients
Sample code sample code

Spring Data : Embedded /Non embedded?

I'm using Spring Data for Neo4j and MongoDB, I find it awesome, but now I just found out about the embedded and not embedded DB stuff.
Here's my situation :
Using Spring Data with the annotations, repositories, templates and thinking that I just need to change the DB address to make it work elsewhere.
My questions :
1) I don't even understand what they mean by embedded vs non embedded (on the same machine vs on a distant machine ?)
2) Do I have to change all the work I've done to make it work with a 'non embedded' DB ?
What I wan't to do is to deploy my Spring Boot app that is using Neo4j to Heroku or CloudFoundry and use Graphen (Neo4j paas) for the DB. But when I saw all this story about Spring Data working only for embedded, I just lost all the hope and happiness I had when building my app.
3) If 2) is Yes, is it an easy transition ? is there a lot of things to change ?
EDIT :
Here's what I'm talking about :
http://inserpio.wordpress.com/2014/04/30/extending-the-neo4j-server-with-spring-data-neo4j/
He's adding some custom boilerplate code to make it work with a non embeded DB, is it ok ? Why it doesn't work as any other DB (like with JPA, where you just specify the address of the DB).
inserpio here. Don't lose your happiness, please: Spring Data Neo4j team is working hard to implement a new release that improves remote performances.
When Spring Data Neo4j started neither Cypher nor Neo4j-Server existed, while only the embedded version was available. As the server version was delivered SDN team provided a quick solution that works well if you only use repositories, but becomes a little bit too chatty is you want to use #Entity too. The problem is matching those #Entity with the returned nodes.
Since the new version is still not completed, for the moment, you could move you persistence-logic more tight to the database as a server extension. I explained it on the link you mentioned. It's a really fast refactoring: just move your entities and repositories to a new simple java project, install the resulting jar in the 'plugins' folder, one line configuration in the neo4j-server.properties and expose your queries as simple REST services.
Hope this could help.
Do not hesitate to contact me for any further question.
Cheers,
Lorenzo

Mongodb document versioning using spring data

I am using Spring Data in my Java application to connect to MongoDb and have a requirement around versioning the documents (basically storing the history).
It seems that its pretty straightforward in Ruby, if one uses Mongoid
I was wondering if spring data has something similar for Java. Or are you better of trying to implement your own.
Yes there is a very good feature in Spring data which is auditing you can refer to the following link
http://www.javacodegeeks.com/2013/11/auditing-entities-in-spring-data-mongodb-2.html
After lot of research I found that https://javers.org/documentation/spring-boot-integration/. This works like rock solid and very easy to implement.
This library helps to store all the history of the changed fields and easy to query over it and it has great support of it. The sample POC shared here: https://nullbeans.com/auditing-using-spring-boot-mongodb-and-javers/