• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Configuration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.neo4j.ogm.config.Configuration的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Configuration类属于org.neo4j.ogm.config包,在下文中一共展示了Configuration类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: GraphDB

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
public GraphDB() {

		Configuration configuration = Components.configuration();

		configuration.driverConfiguration().setDriverClassName("org.neo4j.ogm.drivers.http.driver.HttpDriver")
				.setURI(NEO4J_DATABASE_URI);

		SessionFactory sessionFactory = new SessionFactory(configuration, "com.cotrino.knowledgemap.db");
		this.session = sessionFactory.openSession();

		this.numPages = this.getNumber("MATCH (n:Page) RETURN COUNT(n) AS numPages");
		logger.debug("Amount of pages: " + numPages);
		this.maxNodeRank = this.getNumber("MATCH (n:Page) RETURN MAX(n.nodeRank) AS maxRank");
		logger.debug("Max node rank: " + maxNodeRank);
		this.minId = this.getNumber("MATCH (n:Page) RETURN MIN(id(n)) AS minId");
		logger.debug("Min ID: " + minId);
		this.maxId = this.getNumber("MATCH (n:Page) RETURN MAX(id(n)) AS maxId");
		logger.debug("Max ID: " + maxId);
		
	}
 
开发者ID:cotrino,项目名称:language_KnowledgeMap,代码行数:21,代码来源:GraphDB.java


示例2: assertCredentials

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
private static void assertCredentials(Configuration actual, String username,
		String password) {
	Credentials<?> credentials = actual.driverConfiguration().getCredentials();
	if (username == null & password == null) {
		assertThat(credentials).isNull();
	}
	else {
		assertThat(credentials).isNotNull();
		Object content = credentials.credentials();
		assertThat(content).isInstanceOf(String.class);
		String[] auth = new String(Base64.decode(((String) content).getBytes()))
				.split(":");
		assertThat(auth[0]).isEqualTo(username);
		assertThat(auth[1]).isEqualTo(password);
		assertThat(auth).hasSize(2);
	}
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:18,代码来源:Neo4jPropertiesTests.java


示例3: createConfiguration

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
/**
 * Create a {@link Configuration} based on the state of this instance.
 * @return a configuration
 */
public Configuration createConfiguration() {
	Configuration configuration = new Configuration();
	configureDriver(configuration.driverConfiguration());
	if (this.compiler != null) {
		configuration.compilerConfiguration().setCompilerClassName(this.compiler);
	}
	return configuration;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:13,代码来源:Neo4jProperties.java


示例4: defaultUseHttpDriverIfEmbeddedDriverIsNotAvailable

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void defaultUseHttpDriverIfEmbeddedDriverIsNotAvailable() {
	Neo4jProperties properties = load(false);
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.HTTP_DRIVER,
			Neo4jProperties.DEFAULT_HTTP_URI);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:Neo4jPropertiesTests.java


示例5: httpUriUseHttpServer

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void httpUriUseHttpServer() {
	Neo4jProperties properties = load(true,
			"spring.data.neo4j.uri=http://localhost:7474");
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.HTTP_DRIVER, "http://localhost:7474");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:Neo4jPropertiesTests.java


示例6: fileUriUseEmbeddedServer

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void fileUriUseEmbeddedServer() {
	Neo4jProperties properties = load(true,
			"spring.data.neo4j.uri=file://var/tmp/graph.db");
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.EMBEDDED_DRIVER,
			"file://var/tmp/graph.db");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:Neo4jPropertiesTests.java


示例7: credentialsAreSetFromUri

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void credentialsAreSetFromUri() {
	Neo4jProperties properties = load(true,
			"spring.data.neo4j.uri=http://user:[email protected]:7474");
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.HTTP_DRIVER,
			"http://user:[email protected]:7474");
	assertCredentials(configuration, "user", "secret");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:Neo4jPropertiesTests.java


示例8: embeddedModeDisabledUseHttpUri

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void embeddedModeDisabledUseHttpUri() {
	Neo4jProperties properties = load(true,
			"spring.data.neo4j.embedded.enabled=false");
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.HTTP_DRIVER,
			Neo4jProperties.DEFAULT_HTTP_URI);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:Neo4jPropertiesTests.java


示例9: embeddedModeWithRelativeLocation

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void embeddedModeWithRelativeLocation() {
	Neo4jProperties properties = load(true,
			"spring.data.neo4j.uri=target/neo4j/my.db");
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.EMBEDDED_DRIVER,
			"target/neo4j/my.db");
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:Neo4jPropertiesTests.java


示例10: Neo4jPersistService

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Inject
Neo4jPersistService(@Neo4j String[] persistencePackages, @Neo4j Properties persistenceProperties)
{
    this.persistencePackages = persistencePackages;
    configuration = new Configuration();
    configuration.driverConfiguration()
            .setDriverClassName(persistenceProperties.getProperty("neo4j.ogm.driver"))
            .setURI(persistenceProperties.getProperty("neo4j.ogm.url"))
            .setCredentials(new UsernamePasswordCredentials(persistenceProperties.getProperty("neo4j.ogm.username"),
                                                            persistenceProperties.getProperty("neo4j.ogm.password")));
}
 
开发者ID:mangrish,项目名称:guice-persist-neo4j,代码行数:12,代码来源:Neo4jPersistService.java


示例11: credentialsAreSet

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void credentialsAreSet() {
	Neo4jProperties properties = load(true,
			"spring.data.neo4j.uri=http://localhost:7474",
			"spring.data.neo4j.username=user", "spring.data.neo4j.password=secret");
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.HTTP_DRIVER, "http://localhost:7474");
	assertCredentials(configuration, "user", "secret");
}
 
开发者ID:philwebb,项目名称:spring-boot-concourse,代码行数:10,代码来源:Neo4jPropertiesTests.java


示例12: configuration

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Bean
public Configuration configuration() {
    Configuration config = new Configuration();
    config
            .driverConfiguration()
            .setDriverClassName("org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver");
    return config;
}
 
开发者ID:olemartin,项目名称:chess-tournament,代码行数:9,代码来源:ServiceIntegrationTest.java


示例13: getConfiguration

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Bean
public Configuration getConfiguration()
{
    if ( StringUtils.isEmpty( url ) )
    {
        url = "http://localhost:" + dbmsConnectorHttpPort;
    }
    Configuration config = new Configuration();
    config.driverConfiguration().setDriverClassName( HttpDriver.class.getName() )
            .setCredentials( username, password ).setURI( url );
    return config;
}
 
开发者ID:AtomRain,项目名称:neo4j-extensions,代码行数:13,代码来源:AppGraphConfig.java


示例14: defaultUseEmbeddedInMemoryIfAvailable

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
@Test
public void defaultUseEmbeddedInMemoryIfAvailable() {
	Neo4jProperties properties = load(true);
	Configuration configuration = properties.createConfiguration();
	assertDriver(configuration, Neo4jProperties.EMBEDDED_DRIVER, null);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:Neo4jPropertiesTests.java


示例15: assertDriver

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
private static void assertDriver(Configuration actual, String driver, String uri) {
	assertThat(actual).isNotNull();
	DriverConfiguration driverConfig = actual.driverConfiguration();
	assertThat(driverConfig.getDriverClassName()).isEqualTo(driver);
	assertThat(driverConfig.getURI()).isEqualTo(uri);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:Neo4jPropertiesTests.java


示例16: setConfiguration

import org.neo4j.ogm.config.Configuration; //导入依赖的package包/类
/**
 * Set the configuration to use.
 * @param configuration the configuration
 */
public void setConfiguration(Configuration configuration) {
	this.configuration = configuration;
}
 
开发者ID:philwebb,项目名称:spring-boot-concourse,代码行数:8,代码来源:SessionFactoryProvider.java



注:本文中的org.neo4j.ogm.config.Configuration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DataInformationBox类代码示例发布时间:2022-05-22
下一篇:
Java PlaceManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap