var urlMatches = /(.*)\/reqCatch.html.*/.exec(window.kk);
this.baseUrl = urlMatches[1] + '/';
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
// 注解类
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.TYPE})
@Documented
@Import({CatchReqConfiguration.class}) // 将这个类交给Spring管理
public @interface CatchReq {
}
// 配置类
@Configuration
@ComponentScan(basePackages= {"com.req.controller","com.req.filter"}) // 扫描包
public class CatchReqConfiguration {
}
@Configuration
@CatchReq
public class CatchFilterDemo {
@Bean
@SuppressWarnings({ "rawtypes", "unchecked" })
public FilterRegistrationBean timerFilter() {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
filterRegistrationBean.setFilter(new CatrhReqFilter());
filterRegistrationBean.addUrlPatterns("/*");
return filterRegistrationBean;
}
}
<distributionManagement>
<!--正式版本 -->
<repository>
<!-- nexus服务器中用户名:在settings.xml中<server>的id -->
<id>nexus-releases</id>
<!-- 这个名称自己定义 -->
<name>Release repository</name>
<url>http://192.168.1.241:8088/repository/maven-releases/</url>
</repository>
<!--快照 -->
<snapshotRepository>
<id>nexus-snapshots</id>
<name>Snapshots repository</name>
<url>http://192.168.1.241:8088/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>