今天部署一套ssh架构空项目,启动报错,配置了weblogic.xml的<prefer-web-inf-classes>true</prefer-web-inf-classes>,启动还是报错,最后多方搜索找到一个解决的方案。
1 <?xml version="1.0" encoding="UTF-8"?> 2 <weblogic-web-app 3 xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 6 http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd 7 http://xmlns.oracle.com/weblogic/weblogic-web-app 8 http://xmlns.oracle.com/weblogic/weblogic-web-app/1.7/weblogic-web-app.xsd"> 9 <!-- 1.7版本 --> 10 <container-descriptor> 11 <index-directory-enabled>true</index-directory-enabled> 12 <show-archived-real-path-enabled>true</show-archived-real-path-enabled> 13 <!-- prefer-application-packages和 prefer-web-inf-classes二选一 --> 14 <!-- <prefer-web-inf-classes>true</prefer-web-inf-classes> --> 15 <prefer-application-packages> 16 <package-name>org.apache.commons.lang.*</package-name> 17 <package-name>antlr.*</package-name> 18 <package-name>org.hibernate.*</package-name> 19 <package-name>javax.persistence.*</package-name> 20 </prefer-application-packages> 21 </container-descriptor> 22 </weblogic-web-app>
weblogic版本是12.1.3,所以配置了1.7的xsd
时间: 2024-10-12 00:02:42