--- /dev/null
+package compbio.spring;
+
+import org.springframework.context.annotation.Bean;
+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;
+import org.springframework.web.servlet.view.InternalResourceViewResolver;
+
+@Configuration
+@EnableWebMvc
+@ComponentScan(basePackages = "compbio.controllers")
+public class WebConfig extends WebMvcConfigurerAdapter {
+
+ @Bean
+ public InternalResourceViewResolver viewResolver() {
+ InternalResourceViewResolver resolver = new InternalResourceViewResolver();
+ resolver.setPrefix("/WEB-INF/view/");
+ resolver.setSuffix(".jsp");
+ return resolver;
+ }
+
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) {
+ registry.addResourceHandler("classpath:/META-INF/resources/webjars/**").addResourceLocations("/webjars/");
+ registry.addResourceHandler("/bootstrap/**").addResourceLocations("/bootstrap/");
+ registry.addResourceHandler("/css/**").addResourceLocations("/css/");
+ registry.addResourceHandler("/images/**").addResourceLocations("/images/");
+ registry.addResourceHandler("/js/**").addResourceLocations("/js/");
+ }
+
+}
\ No newline at end of file