Reputation: 21
Does anyone have any reference project with Spring-boot and Tapestry5? I can't seem to find any samples. I have diificulties in configuring the tapestry bean & Context using a @configuration class without an web.xml.
Upvotes: 2
Views: 1897
Reputation: 95
This works for me:
Register TapestrySpringFilter
@Bean
public FilterRegistrationBean tapesSpringFilter() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new TapestrySpringFilter());
registration.setName("app");
registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class));
return registration;
}
Add context aprameters to application.yml
server:
context_parameters:
tapestry:
use-external-spring-context: true
app-package: com.test.admin
development-modules: ...
qa-modules: ...
I also had to use executable War to avoid problems with loading static files.
Perhaps this approach will not allow you to access the tapestry beans from the spring context.
Upvotes: 0
Reputation: 6326
I've been looking for such an example myself, and I happen to have found one today:
https://github.com/code8/tapestry-boot
The tapestry-boot library implements following features:
bootstraps tapestry framework inside embedded servlet container managed by spring-boot
provides injection of spring-services into tapestry-services
provides injection of tapestry-services into spring-services
To use tapestry-boot simple marks tapestry application module with @TapestryApplication annotation.
See DemoApplicationTests.
Upvotes: 1
Reputation: 2826
This should be what you're looking for https://github.com/trust-wenderson/tapestry-spring
Upvotes: 2