You don't need to do either of those. Just drop your favicon.ico file into `src/main/resources/static`. Then restart your app & test with `curl -O http://your-app-domain/favicon.ico`. This will confirm it's working.
You may need to jump through some hoops to get your browser to refresh the favicon. They tend to agressively cache that file. See here for some suggestions.