Subversion Repositories SmartDukaan

Rev

Rev 21749 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@EnableWebMvc
@Configuration
@ComponentScan({"com.spice.profitmandi.*"})
public class WebConfig extends WebMvcConfigurerAdapter{
        
        private static final String RESOURCES_PATTERN="/resources/**";
        private static final String RESOURCES_LOCATION="/resources/";
        
        @Override
        public void addResourceHandlers(ResourceHandlerRegistry registry) {
           registry.addResourceHandler(RESOURCES_PATTERN).addResourceLocations(RESOURCES_LOCATION);
        }
}