springboot集成axis webservice
时间: 2024-01-15 09:19:38 浏览: 168
以下是Spring Boot集成Axis WebService的步骤:
1. 配置Application类:
```java
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@ServletComponentScan // 扫描自定义的WebFilter和WebListener
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
```
2. 添加servlet过滤规则:
新建`com.efounder.spring.demo.WebServlet`类,继承`AxisServlet`。
```java
import org.apache.axis.transport.http.AxisServlet;
@javax.servlet.annotation.WebServlet(
urlPatterns = "/services/*",
loadOnStartup = 1,
name = "AxisServlet"
)
public class WebServlet extends AxisServlet {
}
```
以上是Spring Boot集成Axis WebService的配置步骤。
阅读全文