File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
java/org/springframework/data/elasticsearch/core Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
public class CustomEntityMapper implements EntityMapper {
9
9
10
+ public CustomEntityMapper (){
11
+ //custom configuration/implementation (e.g. FasterXML/jackson)
12
+ }
13
+
10
14
@ Override
11
15
public String mapToString (Object object ) throws IOException {
16
+ //mapping Object to String
12
17
return null ;
13
18
}
14
19
15
20
@ Override
16
21
public <T > T mapToObject (String source , Class <T > clazz ) throws IOException {
22
+ //mapping String to Object
17
23
return null ;
18
24
}
19
25
}
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<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
6
6
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd" >
7
7
8
- <import resource =" infrastructure.xml" />
8
+ <import resource =" infrastructure.xml" />
9
9
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" />
13
13
<constructor-arg name =" entityMapper" ref =" entityMapper" />
14
- </bean >
14
+ </bean >
15
15
16
16
<bean name =" entityMapper" class =" org.springframework.data.elasticsearch.core.CustomEntityMapper" />
17
17
You can’t perform that action at this time.
0 commit comments