@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/robots.txt").permitAll()
}
@RequestMapping(value = "/robots.txt")
public void robots(HttpServletRequest request, HttpServletResponse response) {
try {
response.getWriter().write("User-agent: *
Disallow: /
");
} catch (IOException e) {
CustomLogger.info(TAG, "robots", "robots(): "+e.getMessage());
}
}