Assemblers
An assembler is an interface object responsible for mapping one or more aggregate(s) to a Data Transfer Object (DTO) and back.
An assembler is an interface object responsible for mapping one or more aggregate(s) to a Data Transfer Object (DTO) and back.
Cross-Origin Resource Sharing (CORS) is supported through a Java filter and can be enabled in any SeedStack application. Seed integrates the CORS filter from dzhuvinov software. There is no need to install and configure the filter manually, it is automatically registered by Seed. All filter options can be specified through configuration properties. Configuration CORS can be enabled and configuration as below: Configuration Tool web: cors: # The servlet path mapping on which CORS will be active path: (String) # If true, Cross-Origin-Resource-Sharing (CORS) will be enabled enabled: (boolean) # Allows to specify custom properties to the CORS filter (see below) properties: key: (String) To dump the web.
As described in the assemblers page, you can inject assemblers and use them directly. However, the business framework provides a Domain-Specific Language (DSL) to do common Aggregate/DTO mapping operations.
The seed-rest-core
and its companion modules provides support for exposing REST resources using JAX-RS. SeedStack implements
the JAX-RS standard through the Jersey 2 implementation.
The seed-web-core
and its companion modules provide support for Web technologies, such as Servlets, WebSockets, embedded
Web servers, serving static resources, etc…
Servlets, filters and listeners can be detected and registered by SeedStack which makes them injectable and interceptable. Servlets You can register a servlet by annotating your servlet class with @WebServlet: @WebServlet("/my-servlet") public class MyServlet extends HttpServlet { ... } You can specify a priority on each listener to order them in the context initialization and destruction sequences: add a @Priority annotation to the listener class with the absolute priority as value.
SeedStack provides static resource serving from the classpath and the document root with some benefits over the container default resource serving: Automatic serving of pre-minified and/or pre-gzipped versions of resources, On-the-fly gzipping of resources, Cache friendly. Behavior The behavior is to serve resources located under the document root folder and, if not found, under the META-INF/resources classpath location on the /* path. For example, consider the following folder tree:
The SeedStack W20 bridge acts as an integration bridge between the Seed Java framework and the W20 Web framework.
The SeedStack Web bridge is an API that enables to quickly integrate your Web frontend to your SeedStack backend.
SeedStack Web-Services add-on provides JAX-WS integration through the Metro reference implementation.
Seed also integrates the Java API for WebSocket (JSR 356), allowing server and client endpoints to be injected. WebSocket support requires Java 7 and a compatible server to work. Server endpoints Server endpoints have to explicitly specify a SeedBaseEndpointConfigurator to be managed by Seed. @ServerEndpoint(value = "/chat", configurator = BaseServerEndpointConfigurator.class) public class ChatEndpoint { @Logging private Logger logger; @Inject EchoService echoService; @OnOpen public void onOpen(Session session) { logger.info("Connected ... " + session.