Annotation Configuration Replacement for mvc:resources – Spring

For Spring 3 & 4:

One way to do this is to have your configuration class extend WebMvcConfigurerAdapter, then override the following method as such:

@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
    registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)