/** * Constructs a new {@link SessionFactory} by initialising the object-graph mapping meta-data from the given list of domain * object packages, and also sets the baseConfiguration to be used. * <p> * The package names passed to this constructor should not contain wildcards or trailing full stops, for example, * "org.springframework.data.neo4j.example.domain" would be fine. The default behaviour is for sub-packages to be scanned * and you can also specify fully-qualified class names if you want to cherry pick particular classes. * </p> * Indexes will also be checked or built unless auto index mode is set to <code>NONE</code>. * * @param configuration The baseConfiguration to use * @param packages The packages to scan for domain objects. They will be merged with the configuration. */ public SessionFactory(Configuration configuration, String... packages) { this(newConfiguredDriverInstance(configuration), configuration.mergeBasePackagesWith(packages)); if (configuration.getAutoIndex() != NONE) { runAutoIndexManager(configuration); } }