Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ApplicationPath("/")
- public class FrontConfig extends ResourceConfig {
- @Inject
- public FrontConfig(ServiceLocator serviceLocator) {
- GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);
- GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);
- guiceBridge.bridgeGuiceInjector(Guice.createInjector(new ServletModule() {
- @Override protected void configureServlets() {
- }
- }));
- register(FreemarkerFeature.class);
- property(FreemarkerFeature.CONFIGURATION_CUSTOMIZER, (ConfigurationCustomizer) configuration -> {
- configuration.addAutoImport("layout", "/WEB-INF/ftl/macro/layout.ftl");
- });
- register(ObjectMapperProvider.class);
- register(CustomJacksonFeature.class);
- register(AuthFilter.class);
- register(AuthenticationRequiredExceptionMapper.class);
- packages(Env.getRootPackage() + ".front.resource");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement