I am working on a java project which does not use spring boot. I am asked to integrate swagger into my project. I have been searching the internet on how to do it without spring boot, but I have found no clue.
Manual is the way to go. Luckily, they have a tool! https://swagger.io/tools/swagger-editor/ The other great thing is that Swagger is not Java specific so it can be re-used for other REST implementations in other languages.
Spring Boot is just an integration for Swagger. You can also make use of Swagger withtout using Spring Boot.
You can use Swagger core library for getting Swagger to work.
https://github.com/swagger-api/swagger-core
Related
I have a WSDL-file, which describes properties of a SOAP-requests (XSD-parts and also service-parts). Using Maven, I was able to generate model classes.
Now I want to use given classes to provide some SOAP-services.
Most of tutorials using Spring Boot, but I don't want. They also use a given wsdl-file and xsd-file, which I don't have.
All I want, is to have a easy to code SOAP endpoint, which uses Spring integration, where I can use stuff link #Inject. Do you have an idea?
When I worked with grails I faced a plugin https://grails.org/plugin/spring-security-ui which allowed to CRUD Users and Roles with corresponding UI so one didn't need to write code for CRUD/filter Users and Roles. Now I work with Spring Boot and writing web-application and looking for something similar (to https://grails.org/plugin/spring-security-ui) some dependency plugin etc which would introduce similar functionality. Is there someting similar for Spring Boot or I need to write the functionality from the scratch?
Thanks, cheers
I think Spring Vaadin should manage with that.
I have developed a Spring/JPA application: the service, repository and domain layers are nearing completion.
The only layer that is missing is the web layer. I am considering using Playframework 2.0 for the web layer but I am not sure whether I can inject/use spring beans in my Playframework 2.0 classes.
Is this possible? If so how?
You can. Updated for Play 2.5.x:
https://github.com/remithieblin/play-spring-loader
Alex.p is right there is support for spring in PlayFramework
Have a look here :
http://typesafe.com/blog/announcing-play-framework-21-the-high-velocit
and on example here :
https://github.com/guillaumebort/play20-spring-demo
Cheers
I just tested it on my project it works but on playframework 2.1 in 2.0 it didn't work.
Here is a another way of injecting beans using Spring. Standard annotations are used. No plugin is required.
https://github.com/huntc/play-spring
There's already support for the Spring IoC container in Play. It's just a matter of editing the application.conf file as mentioned in the linked to article.
Ignore the above see comment: it seems that this was dropped in playframework 2.0.
We are using Spring 2.5 and spring-json for JSON support. We have the below configuration in views.xml
<bean name="jsonView" class="org.springframework.web.servlet.view.json.JsonView"/>
Now, we have learnt that Spring 3.x uses JackSon API internally for JSON support. My question is how can we override the default implementation of Spring 2.5 to use JackSon - The way Spring 3.x begins.
Note: We don't want to migrate my Spring version, but, want Spring 2.5 to use this JackSon API instead of Spring-Json
Is it possible to replace Spring's JSON support without breaking it ?
Unfortunately, Spring's own documentation states that Spring-json is "deeply" a component of the existing Spring 2.5 framework.
See : http://spring-json.sourceforge.net/
That said - removing the dependencies on spring-json, adding your own JSON parser, and rebuilding spring can be done. I assume this will require a lot of work given that spring-json is a major component of the whole Spring MVC suite.
An alternative : Building a Facade
In addition, I don't know of any Java EE specification for Json libraries which implies that there is a good chance that all internal Spring json dependencies are specific to the APIs defined by Spring-json [compare this, for example, with JPA, which is generically defined by Java EE, so that it is easy to replace many a DAO framework].
Generally, you can package any sort of JSon library as a Spring component that will be available in the application context. Now - if you reimplement the necessary interfaces using the facade pattern, using Jackson under the hood, your version of Spring 2.5 should work the same. Alternatively, you could intercept Json related calls of interest using Spring's aspect oriented injection libraries, and reroute them as necessary.
Again, however, these are all advanced tasks - they would be excellent learning projects but I'm not sure that the time investment would really pay off if this is a production application.
http://www.javaworld.com/javaworld/jw-02-2008/jw-02-springcomponents.html
Interested to know how many are using BeanBuilder in production as a replacement to XML based config for Spring 3.x?
How would you go about doing that? It's been proposed that the Grails bean builder be added to Spring in a future release but that hasn't happened yet.