--- title: 'Springboot WildFly 專案配置' tags: WildFly,Springboot description: Springboot WildFly 專案配置 --- [TOC] --- # build.gradle ``` Gradle ... all { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-el" exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-core" exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-websocket" } ... dependencies { ... implementation ('org.springframework.boot:spring-boot-starter-web') { exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat" } compileOnly 'javax.servlet:javax.servlet-api:4.0.1' ... } ``` --- # jboss-deployment-structure.xml src/main/webapp/META-INF/jboss-deployment-structure.xml ``` XML <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> <exclude-subsystems> <subsystem name="jsf" /> <subsystem name="logging" /> </exclude-subsystems> <exclusions> <module name="javax.validation.api" /> <module name="javax.faces.api" /> <module name="org.hibernate.validator" /> <!-- Log 使用 slf4j --> <module name="org.apache.commons.logging" /> <module name="org.slf4j" /> <module name="org.slf4j.ext" /> <module name="org.slf4j.impl" /> <module name="org.apache.logging.log4j" /> <module name="org.apache.logging.log4j.api"/> </exclusions> </deployment> </jboss-deployment-structure> ``` --- # jboss-web.xml ``` XML <jboss-app> <context-root>xxxx</context-root> </jboss-app> ``` ---