Which frameworks have initializer or starter? - frameworks

Spring initializer, Steeltoe Initializer, laravel initializer ... all of these solutions are web based tools to generate personalized framework structure. Is there other frameworks that offers similar solutions ?

In Java ecosystem, Micronaut and Quarkus have each a basic initializer :
https://micronaut.io/launch/
https://code.quarkus.io/

Related

How to use Axon with Vert.X

I have a CQRS/Eventsourcing architecture with 3 microservices. I implemented 2 microservices with vert.x 4 and I implemented CQRS/Eventsourcing without framework to improve my knowledge of this type of architecture. For the third microservice I would like to use AxonIq Framework but I have a problem with Aggregate annotation because it's not avalaible with vert.x but only with Spring.
I implemented a Spring microservice using Axon and everything work fine but I would like to know if someone can help me for use vert.x with AxonIq ? If anyone know a workaround for this problem ?
Thank
Axon Farmework provide something called Configuration API. You can have a look at the Configuration class but for making use of it, you need a Configurer, which will provide you all means of configuring your components!
On the ref-guide, you also have several examples of how to do the configuration using the API or Srring Boot. Example for Commands can be found here.
To help a bit more, I can also share a small project I made using Dropwizard and Axon Framework, meaning no Spring was used and all the Configuration was done through the API.
You can find it here https://github.com/lfgcampos/axon-playground/tree/master/chat-getting-started-dropwizard

Is it possible to have a class support both a JAX-RS service and JAX-WS service?

I've created a RESTful web service using jersey and JAX-RS annotations. It's also documented using enunciate and looks great. However, SOAP support has been requested as an option. I noticed in this outdated enunciate example JAX-WS and JAX-RS annotations in the same class. Is this possible? I've tried it myself and enunciate generates documentation correctly, but the services don't actually work.
I'd prefer to have the exact same class support both interfaces rather than two separate classes (one soap one rest) pointing to the business logic class. This would prevent possibly having code in two places.
Here's the example on outdated software versions:
http://docs.codehaus.org/display/ENUNCIATE/A+Rich+Web+service+API+for+Spring
I'm using
Jersey 1.8
Spring 3.0.5
Weblogic 11g
Thanks!
/Chip
I'm not sure what might not be working, but a lot of the Enunciate example modules use both the SOAP and REST annotations on the same class.
Here's one for Jersey/JAX-WS.
Here's one for JBoss WS/RestEasy.
Here's one for CXF.
We ended up making a separate service for SOAP than the REST service. We also found it best to have interfaces for each that enunciate could generate from. This way we could control what documentation it generated. It also started functioning smoother. Still having a problem with the namespaces though as they're all default and ns0 is generated but enunciate links are to ns2/3/4/5/etc. So many links are broken.

Is there generic Specification for JPASpecificationExecutor to use in Web

Spring Data has a native web support for Pageable send over the web, as parameters in HTML Query, through PageableHandlerMethodArgumentResolver.
I have not found JPA Specification executor for that, which from my point of view would be very useful.
Is there one?
The reason that there's no generic one available for you is that the predicates you build in it is completely depending on your domain model. A good example for how to use Specifications with Spring MVC can be found in the answer to this question.

Support for annotation inheritance in Jersey

I am working on creating a SOA project. I want to use Jersey to expose the services on rest. In my project the standard is to create a API project which has API interfaces and DTOs. The implementation project depends on the API project and all implementation is written in the implementation.
The idea behind this architecture is that, we could create two API projects one for REST and other for SOAP, annotate the interfaces with required annotations. As a result the implementation would be unaware about the method used to expose the service (I mean REST and SOAP).
But the problem in Jersey is unable to discover the annotations on the interface and keeps throwing following exception
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
A similar question has already been asked - JAX-RS Jersey/Grizzly Define an interface resource - The answer says that it is possible using Spring-Jersey.
But I tried various configuration options for spring-jersey - including - http://jersey.java.net/nonav/apidocs/1.8/contribs/jersey-spring/com/sun/jersey/spi/spring/container/servlet/package-summary.html
But did not have any success.
Questions
The idea of trying to manage the different ways of exposing service thru interface, is it a feasible and good idea? How are experts in the industry doing?
How can I manage to use Jersey to understand the annotations done on Interface?
Is some other framework like RestEasy going to help?

Locale instance in web service

How can I use instances of java.util.Locale as parameter or result in a webservice?
My webservice uses Apache CXF.
The only way to do so is to use an XmlTypeAdapter to map the Locale object into something that JAXB can understand. Check the JAXB docs for instructions about the type adapters. CXF also has an example in the java_first_jaxws sample folder for mapping some interface things into stuff that JAXB can understand. Very similar concept here.