This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 885
/
web.xml
62 lines (56 loc) · 2.25 KB
/
web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>io.swagger.sample.MyApplication</param-value>
</init-param>
<!-- specify resource classes to scan -->
<init-param>
<param-name>openApi.configuration.resourceClasses</param-name>
<param-value>io.swagger.sample.resource.UserResource</param-value>
</init-param>
<!-- specify scanner implementation,
e.g JaxrsAnnotationScanner scanning resourceClasses defined above (or resourcePackages)
but not considering resources defined by custom application
or JaxrsApplicationAndAnnotationScanner also considering resources defined by custom application
or JaxrsApplicationScanner only considering resources defined by custom application
-->
<init-param>
<param-name>openApi.configuration.scannerClass</param-name>
<param-value>io.swagger.v3.jaxrs2.integration.JaxrsAnnotationScanner</param-value>
</init-param>
<init-param>
<param-name>openApi.configuration.prettyPrint</param-name>
<param-value>true</param-value>
</init-param>
<!-- alternatively specify config location
<init-param>
<param-name>openApi.configuration.location</param-name>
<param-value>/openapi-configuration.json</param-value>
</init-param>
-->
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/sample/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/sample</param-value>
</context-param>
<filter>
<filter-name>ApiOriginFilter</filter-name>
<filter-class>io.swagger.sample.util.ApiOriginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ApiOriginFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>