Skip to content

为什么用spring boot方式启动的时候不加载filter?/ Why is the filter not loaded when using spring boot to startup? #151

@lqscript

Description

@lqscript

SpringBootAppContext.class

    @Override
    protected void loadServants() {

        loadAppContextListeners();

        loadAppServants();
    }

SpringAppContext.class

    @Override
    protected void loadServants() {
        this.applicationContext = new ClassPathXmlApplicationContext("servants-spring.xml");

        loadAppContextListeners(this.applicationContext);

        loadAppServants(this.applicationContext);

        loadDefaultFilter();

        loadAppFilters(this.applicationContext);
    }

XmlAppContext.class

    @Override
    protected void loadServants() throws Exception {
        XMLConfigFile cfg = new XMLConfigFile();
        cfg.parse(getClass().getClassLoader().getResource("servants.xml").openStream());
        XMLConfigElement root = cfg.getRootElement();
        ArrayList<XMLConfigElement> elements = root.getChildList();
        loadInitParams(root.getChildListByName("context-param"));

        loadAppContextListeners(elements);

        loadAppServants(elements);
        
        loadDefaultFilter();
        
        loadAppFilters(elements);
        
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions