I am trying to add support in our iOS app for Universal Links. So, our server needs to serve up a json file at the path /.well-known/apple-app-site-association
. I created the file with filename apple-app-site-association
in the folder src/main/resources/well-known/
and added the following to our application config:
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry)
{
registry.addResourceHandler(".well-known/**").addResourceLocations("classpath:/well-known/");
}
However, this results in a 404 from the server. After trying many different things, I found that if I took the dot out like this:
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry)
{
registry.addResourceHandler("well-known/**").addResourceLocations("classpath:/well-known/");
}
and navigated to /well-known/apple-app-site-association
, it worked just fine. However, it needs to have the .
in the URL.
Is there some way I can make this work? We are using Spring 4.3.7 and Spring Boot 1.4.5.