I'm new to Java and to Spring.
How can I map my app root http://localhost:8080/ to a static index.html?
If I navigate to http://localhost:8080/index.html its works fine.
My app structure is :

My config\WebConfig.java looks like this:
@Configuration
@EnableWebMvc
@ComponentScan
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**").addResourceLocations("/");
}
}
I tried to add registry.addResourceHandler("/").addResourceLocations("/index.html"); but it fails.

http://localhost:8080/appNamebut its not what I need... - Shoham