How to google for spring 3.0 documentation? - spring

When giving links to spring docs it would be best to link the 3.0 ones, but googling isn't quite productive with them (yet). Is there some "shortcut" (like for java core classes)? For example:
"spring factory-method 2.5.6" gives the docs about 2.5.6, but "spring factory-method 3.0" doesn't give anything from 3.0.
If you know the name of the chapter (after seeing it in the 2.5.6 results), you can add it to the search terms, like "spring factory-method 3.0 IoC Container" it works.

spring factory-method 3.0.x results in a link to the newest reference documentation. Is it what you want?

For javadoc, if the first result is for 2.5.6 / 2.0.x, you can open it and change the URL from:
/2.0.x/api/...
to
/3.0.x/javadoc-api/...
For example try:
http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/beans/factory/FactoryBean.html
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/beans/factory/FactoryBean.html

Related

Upgrade from SpringFox2.x to SpringFox3.0 open API

We are trying upgrade SPringFox2.0 to 3.0 Open API Specification. But when we generate open doc using '' url it is showing version as 2.0. Not sure why the version still pointing to old version.
We are using Springboot application
I followed the below steps to upgrade as per spring fox documentation
[http://springfox.github.io/springfox/docs/current/][1]
"2.1.3. Migrating from existing 2.x version"
Spring Boot Applications
1.Remove library inclusions of earlier releases. Specifically remove springfox-swagger2 and springfox-swagger-ui inclusions.
2.Remove the #EnableSwagger2 annotations
3.Add the springfox-boot-starter
4.Springfox 3.x removes dependencies on guava and other 3rd party libraries (not zero dep yet! depends on spring plugin and open api libraries for annotations and models) so if you used guava predicates/functions those will need to transition to java 8 function interfaces
I followed all the steps above, 'http://localhost:XXXX/api/v1/api-docs?group=API_Version_1' it got generated but version is showing 2.0
{"swagger":"2.0","info":{ ........
And also I modified in SwaggerConfig: DocumentationType.SWAGGER_2 TO DocumentationType.OAS_30 (it is not mentioned documentation, I guess they missed it)
I believe still some thing is missing, Spring Fox documentation is still out of date and poor coverage of 3.0 aspects.
I am wondering any one having same problem?
Try to use /v3/api-docs or /api/v3/api-docs in your case.
That did not work.
As per Spring fox documentation:
"The /v2/api-docs URL is the default that SpringFox uses for documentation. The v2 does not refer to your API's documentation version (which can be changed in the Docket configuration), but the version of the Swagger specification being used..."
springfox.documentation.swagger.v2.path=/my/docs (path of yours)

How to integrate Cache2k caching with Spring MVC 4?

I'm building a new Spring mvc project and I'm quite bit impressed to see the performance benchmark of Cache2K. Hoever, I couldn't find any article on how to configure it with the current Spring MVC 4.2.4 and Java 1.8
It'll be a great help if somebody would help me with this.
P.P. - I'm using JavaConfig with complete annotation support
cache2k is integrated well with Spring and Spring Boot. See the documentation section in cache2k User Guide - Spring Framework

Create sample application using spring version 2.5

I want to start with new scratch application using spring 2.5, I want to integrate hibernate also in same project, can anyone suggest ideas?
If you want to go down the Spring Boot road, there is plenty of documentation available:
First of all, check out this part of the documentation.
Next you can check out this sample application, as well as this sample application. Note that the aforementioned samples use Hibernate implicitly though the use of JPA.
You can also take a look at this blog post.

Using Jersey-spring with Spring 4.0

According to you what are the risks of using Spring 4 with the jersey-spring3 integration module?
I have tried to use Spring 4.0 with the jersey spring example and the example still works but i'm unable to identify risks linked to this usage.
I have started using Jersey 2.7 and Spring 4.0.x recently in a project. I have setup a context hierarchy to inject beans, so far, I have discovered only one limitiation but that does not seem relate to Spring 4 but rather to the module itself or the HK2 Spring Bridge.
To give more insight about my use. I have a XJC/JAXB-backed which is consumed by a common service, repository and exposed through JAX-WS, and now hopefully through JAX-RS.
The multi-context stuff works now with #Autowiredwith 2.8-SNAPSHOT. I have applied my changes and the 2.8-SNAPSHOT to 2.7. Here is the diff.
Edit (Michael-O; 2014-10-17): Here is a modified Spring module based off 2.11 with multi-context support.
Not an answer to original question, just related information
This may be a little premature, but the new Major 3.0 version of Jersey will be using Spring 4, in the new jersey-spring4 module. The new Major version will be built with Java 8. Though a new Major version will be released, the 2.x line will still be actively developed to keep support for Java 7
I'll update this post once 3.0 has been release.
For anyone interested, you can see this mailing list to see what the Jersey team has to say about the new 3.x line.
Not sure if you came across any issues but I currently face one. It is described in other thread.
Simply, using jersey-spring3 2.12 and spring 4.1.0.RELEASE in one maven project leads to following class incompatibility:
2014-09-14 01:15:44.175:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.server.handler.HandlerCollection#696
db620[org.eclipse.jetty.server.handler.ContextHandlerCollection#27abb6ca[o.e.j.m.p.JettyWebAppContext#737d100a{/,file:/C
:/Users/Josef/Workspace/TransitCenter/src/main/webapp/,STARTING}{file:/C:/Users/Josef/Workspace/TransitCenter/src/main/w
ebapp/}], org.eclipse.jetty.server.handler.DefaultHandler#6968c1d6, org.eclipse.jetty.server.handler.RequestLogHandler#7
d986d83]: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependenc
yComparator()Ljava/util/Comparator;
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparato
r()Ljava/util/Comparator;
at org.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationCon
figUtils.java:136)

Spring 2.5 or 3.0

I have a book called "Spring Recipes" which seems very good so far, but does not cover Spring 3.0. Should I continue with this book or hunt down a resource/s which covers Spring 3.0 and start from there?
I think for the big picture you don't necessarily need a book on Spring 3.0. If you are happy with your current book, keep using it. Once you've read through one book on Spring and have the basic concepts, you'll be ready to take on the reference documentation on the springframework.org website. You can get the descriptions of what changed with 3.0 and get more in-depth details about how Spring works.

Resources