Class ArtDemoConfig


  • @Configuration
    @Import(RDF4JConfig.class)
    @ComponentScan(value="org.eclipse.rdf4j.spring.demo.dao",
                   includeFilters=)
    public class ArtDemoConfig
    extends Object
    Spring config for the demo.

    Here is what it does:

    • it imports RDF4JConfig which interprets the config properties (in our example, they are in application.properties) and registers a number of beans.
    • it scans the org.eclipse.rdf4j.spring.demo.dao package, finds the DAOs, registers them as beans and injects their dependencies
    • it configures the 'data inserter' beans, which read data from the 'artists.ttl' file and adds them to the repository at startup

    See Rdf4J-Spring for an overview and more pointers.

    Since:
    4.0.0
    Author:
    Florian Kleedorfer
    • Constructor Detail

      • ArtDemoConfig

        public ArtDemoConfig()
    • Method Detail

      • getDataInserter

        @Bean
        public DataInserter getDataInserter()
      • getInitialDataInserter

        @Bean
        public InitialDataInserter getInitialDataInserter​(@Autowired
                                                          DataInserter dataInserter,
                                                          @Value("classpath:/artists.ttl")
                                                          org.springframework.core.io.Resource ttlFile)