Skip to content

Commit 655ccb0

Browse files
committed
DATAES-29, ISSUE spring-projects#16 - formatted new files
1 parent 7f91413 commit 655ccb0

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/test/java/org/springframework/data/elasticsearch/core/CustomEntityMapper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@
77
*/
88
public class CustomEntityMapper implements EntityMapper {
99

10+
public CustomEntityMapper(){
11+
//custom configuration/implementation (e.g. FasterXML/jackson)
12+
}
13+
1014
@Override
1115
public String mapToString(Object object) throws IOException {
16+
//mapping Object to String
1217
return null;
1318
}
1419

1520
@Override
1621
public <T> T mapToObject(String source, Class<T> clazz) throws IOException {
22+
//mapping String to Object
1723
return null;
1824
}
1925
}

src/test/resources/elasticsearch-template-custom-mapper.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
5-
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
5+
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
77

8-
<import resource="infrastructure.xml" />
8+
<import resource="infrastructure.xml"/>
99

10-
<bean name="elasticsearchTemplate"
11-
class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
12-
<constructor-arg name="client" ref="client" />
10+
<bean name="elasticsearchTemplate"
11+
class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
12+
<constructor-arg name="client" ref="client"/>
1313
<constructor-arg name="entityMapper" ref="entityMapper"/>
14-
</bean>
14+
</bean>
1515

1616
<bean name="entityMapper" class="org.springframework.data.elasticsearch.core.CustomEntityMapper"/>
1717

0 commit comments

Comments
 (0)