File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
src/main/java/cz/cvut/kbss/datasetdashboard Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1111import org .springframework .http .converter .HttpMessageConverter ;
1212import org .springframework .http .converter .ResourceHttpMessageConverter ;
1313import org .springframework .http .converter .json .MappingJackson2HttpMessageConverter ;
14+ import org .springframework .web .bind .annotation .RestController ;
15+ import org .springframework .web .method .HandlerTypePredicate ;
16+ import org .springframework .web .servlet .config .annotation .PathMatchConfigurer ;
17+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
1418
1519@ Configuration
16- public class WebAppConfig {
20+ public class WebAppConfig implements WebMvcConfigurer {
1721
1822 @ Bean (name = "objectMapper" )
1923 @ Primary
@@ -50,4 +54,9 @@ public static ObjectMapper createJsonObjectMapper() {
5054 objectMapper .configure (SerializationFeature .WRITE_DATES_AS_TIMESTAMPS , false );
5155 return objectMapper ;
5256 }
57+
58+ @ Override
59+ public void configurePathMatch (PathMatchConfigurer configurer ) {
60+ configurer .addPathPrefix ("/rest" , HandlerTypePredicate .forAnnotation (RestController .class ));
61+ }
5362}
Original file line number Diff line number Diff line change 99import org .springframework .web .bind .annotation .RestController ;
1010
1111@ RestController
12- @ RequestMapping ("/rest/ dataset-descriptor" )
12+ @ RequestMapping ("/dataset-descriptor" )
1313public class DatasetDescriptorController {
1414
1515 private final DatasetDescriptorService service ;
Original file line number Diff line number Diff line change 1212import java .util .Map ;
1313
1414@ RestController
15- @ RequestMapping ("/rest/ dataset-source" )
15+ @ RequestMapping ("/dataset-source" )
1616public class DatasetSourceController {
1717
1818 private final DatasetSourceService datasetSourceService ;
Original file line number Diff line number Diff line change 77 * Created by kremep1 on 30/01/18.
88 */
99@ Controller public class IndexController {
10- @ RequestMapping (value = {"/rest/ namespaces" }) public String index () {
10+ @ RequestMapping (value = {"/namespaces" }) public String index () {
1111 return "index" ;
1212 }
1313}
You can’t perform that action at this time.
0 commit comments