springboot解析xml spring-boot怎么配置web.xml中的內容?
spring-boot怎么配置web.xml中的內容?Spring分為幾個文件分別進行配置。如果servlet name中沒有指定init param屬性,那么系統(tǒng)自動搜索的spring配置文件是[s
spring-boot怎么配置web.xml中的內容?
Spring分為幾個文件分別進行配置。如果servlet name中沒有指定init param屬性,那么系統(tǒng)自動搜索的spring配置文件是[servlet name]-servlet.xml. 當需要加載多個與spring相關的配置文件時,首先加載contextloaderlistener類,然后在context param中指定多個spring配置文件,并用逗號分隔每個文件。為了使用方便,配置文件可以用MVC風格進行分解。配置控制器bean的配置文件放在XML文件中,服務器bean放在XML文件中服務.xml文件。