Working with multiple dispatcher servlets in a spring application

后端 未结 3 925
心在旅途
心在旅途 2021-02-09 14:18

In my spring application, I have the following configuration classes for the spring environment:

WebAppInitializer.java

@Order(value=1)
         


        
3条回答
  •  野的像风
    2021-02-09 15:13

    We can have to multiple Dispatcher Servlets, like we can have 2(or more) DispatcherServlet with 2( or more) servlets name.So the D1 and D2 could map to different URL path.Example:-

    
    
        mac
        org.springframework.web.servlet.DispatcherServlet
        1
    
    
    
    
            windows
            org.springframework.web.servlet.DispatcherServlet
            1
    
    

    URL path could be mapped like :-

    
    mac
    /mac/*
    
    
    
        windows
         /windows/*
    
    

提交回复
热议问题