package de.otto.edison.togglz.configuration;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.togglz.console.TogglzConsoleServlet;
import org.togglz.servlet.TogglzFilter;

@Configuration
public class TogglzWebConfiguration {

    @Bean
    public FilterRegistrationBean togglzFilter() {
        FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
        filterRegistration.setFilter(new TogglzFilter());
        filterRegistration.addUrlPatterns("/*");
        return filterRegistration;
    }

    @Bean
    public ServletRegistrationBean togglzServlet(@Value("${management.context-path:/internal}") String prefix) {
        return new ServletRegistrationBean(new TogglzConsoleServlet(), prefix + "/togglz/*");
    }
}

@@ -103,81 +103,8 @@
 ue;%0A
-import org.springframework.boot.context.embedded.FilterRegistrationBean;%0A
 impo
@@ -169,24 +169,24 @@
 rationBean;%0A
+
 import org.s
@@ -337,48 +337,8 @@
 let;
-%0Aimport org.togglz.servlet.TogglzFilter;
 %0A%0A@C
@@ -392,300 +392,12 @@
 n %7B%0A
-%0A
     
-@Bean%0A    public FilterRegistrationBean togglzFilter() %7B%0A        FilterRegistrationBean filterRegistration = new FilterRegistrationBean();%0A        filterRegistration.setFilter(new TogglzFilter());%0A        filterRegistration.addUrlPatterns(%22/*%22);%0A        return filterRegistration;%0A    %7D%0A
 %0A   

Make Togglz compatible to not embedded Tomcat