Last active
May 3, 2024 13:57
-
-
Save dhval/8fba7173312f6a6ea7ed to your computer and use it in GitHub Desktop.
Convert Excel to JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebMvc | |
@ComponentScan(basePackages = {"com.example"}) | |
public class MapTrucksConfig extends WebMvcConfigurerAdapter { | |
@Override | |
public void addViewControllers(ViewControllerRegistry registry) { | |
registry.addViewController("/").setViewName("index"); | |
} | |
@Override | |
public void addResourceHandlers(ResourceHandlerRegistry registry) { | |
registry.addResourceHandler("/bower_components/**", "/scripts/**", "/styles/**", "/fonts/**") | |
.addResourceLocations("/dist/bower_components/", "/dist/scripts/", "/dist/styles/", "/dist/bower_components/bootstrap/fonts/**") | |
.setCachePeriod(315569126); | |
} | |
@Override | |
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { | |
configurer.enable(); | |
} | |
@Bean | |
public ViewResolver viewResolver() { | |
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); | |
viewResolver.setPrefix("/dist/"); | |
viewResolver.setSuffix(".html"); | |
viewResolver.setViewClass(InternalResourceView.class); | |
return viewResolver; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment