Чтобы добавить перехватчик в приложение загрузки весны, выполните следующие
public class MyCustomInterceptor implements HandlerInterceptor{
//unimplemented methods comes here. Define the following method so that it
//will handle the request before it is passed to the controller.
@Override
public boolean preHandle(HttpServletRequest request,HttpServletResponse response){
//your custom logic here.
return true;
}
}
@Configuration
public class MyConfig extends WebMvcConfigurerAdapter{
@Override
public void addInterceptors(InterceptorRegistry registry){
registry.addInterceptor(new MyCustomInterceptor()).addPathPatterns("/**");
}
}
Используйте" &
" вместо "&";.
Вы попробовали это?
<appSettings>
<add key="myurl" value="http://www.myurl.com?&cid=&sid="/>
<appSettings>
Я думаю, что необходимо смочь использовать символ ESC HTML (&). Они могут быть найдены в http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php