wushengzong %!s(int64=6) %!d(string=hai) anos
pai
achega
3cd69d0c65
Modificáronse 4 ficheiros con 13 adicións e 0 borrados
  1. 5 0
      pom.xml
  2. 8 0
      src/main/webapp/WEB-INF/web.xml
  3. BIN=BIN
      src/main/webapp/images/view1.jpg
  4. BIN=BIN
      src/main/webapp/images/view2.jpg

+ 5 - 0
pom.xml

@@ -226,6 +226,11 @@
       <version>3.1.0</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-servlets</artifactId>
+      <version>9.4.8.v20171121</version>
+    </dependency>
 
 
     <!--导入JSTL标签库-->

+ 8 - 0
src/main/webapp/WEB-INF/web.xml

@@ -71,5 +71,13 @@
     <filter-name>shiroFilter</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>-->
+  <filter>
+    <filter-name>cross-origin</filter-name>
+    <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
+  </filter>
+  <filter-mapping>
+    <filter-name>cross-origin</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
 
 </web-app>

BIN=BIN
src/main/webapp/images/view1.jpg


BIN=BIN
src/main/webapp/images/view2.jpg