webx学习1

it2022-05-05  152

webx的配置

如果想在web项目中使用webx框架,需要在web-inf/web.xml文件中进行相关的配置。

1.初始化spring容器

初始化spring容器- /web-inf/web.xml

<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd "> ... <listener> <listener-class>com.alibaba.citrus.webx.context.WebxContextLoaderListener</listener-class> </listener> ... </web-app>

 

Webx利用WebxContextLoaderListener来初始化Spring,用来取代Spring的ContextLoaderListener。

转载于:https://www.cnblogs.com/leiwei/p/3602144.html


最新回复(0)