Class RoutingConfig


  • @Configuration
    class RoutingConfig
    extends Object
    Spring Bean producer that creates a GraphHopper instance and allows to configure the path to OSM file through environment.
    • Constructor Detail

    • Method Detail

      • graphHopper

        @Profile("!test")
        @Bean
        @ConditionalOnProperty(prefix="app.routing",
                               name="engine",
                               havingValue="graphhopper",
                               matchIfMissing=true)
        com.graphhopper.reader.osm.GraphHopperOSM graphHopper()
        Avoids creating real GraphHopper instance when running a @SpringBootTest.
        Returns:
        real GraphHopper
      • downloadOsmFile

        static void downloadOsmFile​(String urlString,
                                    Path osmFile)