clean-up
This commit is contained in:
@@ -1,65 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:jee="http://www.springframework.org/schema/jee"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<!--
|
||||
This will automatically locate any and all property files you have
|
||||
within your classpath, provided they fall under the META-INF/spring
|
||||
directory. The located property files are parsed and their values can
|
||||
then be used within application context files in the form of
|
||||
${propertyKey}.
|
||||
-->
|
||||
<context:property-placeholder location="classpath*:META-INF/spring/*.properties"/>
|
||||
|
||||
|
||||
<!--
|
||||
Turn on AspectJ @Configurable support. As a result, any time you
|
||||
instantiate an object, Spring will attempt to perform dependency
|
||||
injection on that object. This occurs for instantiation via the "new"
|
||||
keyword, as well as via reflection. This is possible because AspectJ
|
||||
is used to "weave" Roo-based applications at compile time. In effect
|
||||
this feature allows dependency injection of any object at all in your
|
||||
system, which is a very useful feature (without @Configurable you'd
|
||||
only be able to dependency inject objects acquired from Spring or
|
||||
subsequently presented to a specific Spring dependency injection
|
||||
method). Roo applications use this useful feature in a number of
|
||||
areas, such as @PersistenceContext injection into entities.
|
||||
-->
|
||||
<!--context:spring-configured/-->
|
||||
|
||||
<!--
|
||||
This declaration will cause Spring to locate every @Component,
|
||||
@Repository and @Service in your application. In practical terms this
|
||||
allows you to write a POJO and then simply annotate the new POJO as an
|
||||
@Service and Spring will automatically detect, instantiate and
|
||||
dependency inject your service at startup time. Importantly, you can
|
||||
then also have your new service injected into any other class that
|
||||
requires it simply by declaring a field for your service inside the
|
||||
relying class and Spring will inject it. Note that two exclude filters
|
||||
are declared. The first ensures that Spring doesn't spend time
|
||||
introspecting Roo-specific ITD aspects. The second ensures Roo doesn't
|
||||
instantiate your @Controller classes, as these should be instantiated
|
||||
by a web tier application context. Refer to web.xml for more details
|
||||
about the web tier application context setup services.
|
||||
|
||||
Furthermore, this turns on @Autowired, @PostConstruct etc support. These
|
||||
annotations allow you to use common Spring and Java Enterprise Edition
|
||||
annotations in your classes without needing to do any special configuration.
|
||||
The most commonly used annotation is @Autowired, which instructs Spring to
|
||||
dependency inject an object into your class.
|
||||
-->
|
||||
<context:component-scan base-package="org.springframework.data.neo4j.aspects">
|
||||
<context:exclude-filter expression=".*_Roo_.*" type="regex"/>
|
||||
<context:exclude-filter expression="org.springframework.context.annotation.Configuration" type="annotation"/>
|
||||
@@ -77,10 +27,7 @@
|
||||
<property name="relationshipEntityStateFactory" ref="relationshipEntityStateFactory"/>
|
||||
</bean>
|
||||
|
||||
<bean id="graphDatabaseService" class="org.neo4j.test.ImpermanentGraphDatabase"
|
||||
destroy-method="shutdown" scope="singleton">
|
||||
<!--constructor-arg index="0" value="${neo4j.databaseDirectory}" /-->
|
||||
</bean>
|
||||
<bean id="graphDatabaseService" class="org.neo4j.test.ImpermanentGraphDatabase" destroy-method="shutdown" scope="singleton"/>
|
||||
|
||||
<bean id="conversionService" class="org.springframework.data.neo4j.fieldaccess.Neo4jConversionServiceFactoryBean"/>
|
||||
<bean id="graphDatabaseContext" class="org.springframework.data.neo4j.support.GraphDatabaseContext" init-method="postConstruct">
|
||||
@@ -134,10 +81,6 @@
|
||||
<property name="mappingContext" ref="mappingContext"/>
|
||||
</bean>
|
||||
|
||||
<!--bean id="neo4jNodeConverter" class="org.springframework.data.neo4j.mapping.Neo4jNodeConverterImpl">
|
||||
<property name="nodeEntityStateFactory" ref="nodeEntityStateFactory"/>
|
||||
</bean-->
|
||||
|
||||
<bean id="mappingContext" class="org.springframework.data.neo4j.mapping.Neo4jMappingContext"/>
|
||||
|
||||
<bean id="relationshipEntityStateFactory" class="org.springframework.data.neo4j.support.relationship.RelationshipEntityStateFactory">
|
||||
@@ -193,7 +136,6 @@
|
||||
<property name="graphDatabaseContext" ref="graphDatabaseContext"/>
|
||||
</bean>
|
||||
|
||||
<!-- Adds transaparent exception translation to the DAOs -->
|
||||
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
|
||||
|
||||
<!-- Adds dependency checks for setters annotated with @Required -->
|
||||
|
||||
@@ -61,8 +61,6 @@ import java.util.Map;
|
||||
public class GraphDatabaseContext {
|
||||
|
||||
private static final Log log = LogFactory.getLog(GraphDatabaseContext.class);
|
||||
public static final String DEFAULT_NODE_INDEX_NAME = "node";
|
||||
public static final String DEFAULT_RELATIONSHIP_INDEX_NAME = "relationship";
|
||||
|
||||
private GraphDatabaseService graphDatabaseService;
|
||||
private ConversionService conversionService;
|
||||
@@ -301,12 +299,10 @@ public class GraphDatabaseContext {
|
||||
|
||||
public boolean isNodeEntity(Class<?> targetType) {
|
||||
return targetType.isAnnotationPresent(NodeEntity.class);
|
||||
//return mappingContext.isNodeEntity(targetType);
|
||||
}
|
||||
|
||||
public boolean isRelationshipEntity(Class targetType) {
|
||||
return targetType.isAnnotationPresent(RelationshipEntity.class);
|
||||
// return mappingContext.isRelationshipEntity(targetType);
|
||||
}
|
||||
|
||||
public Object save(Object entity) {
|
||||
|
||||
Reference in New Issue
Block a user