mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-24 13:02:10 +00:00
DATAES-29, ISSUE #16 - formatted new files
This commit is contained in:
parent
7f91413591
commit
655ccb0cec
@ -7,13 +7,19 @@ import java.io.IOException;
|
|||||||
*/
|
*/
|
||||||
public class CustomEntityMapper implements EntityMapper {
|
public class CustomEntityMapper implements EntityMapper {
|
||||||
|
|
||||||
|
public CustomEntityMapper(){
|
||||||
|
//custom configuration/implementation (e.g. FasterXML/jackson)
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String mapToString(Object object) throws IOException {
|
public String mapToString(Object object) throws IOException {
|
||||||
|
//mapping Object to String
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T mapToObject(String source, Class<T> clazz) throws IOException {
|
public <T> T mapToObject(String source, Class<T> clazz) throws IOException {
|
||||||
|
//mapping String to Object
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
|
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
|
||||||
|
|
||||||
<import resource="infrastructure.xml" />
|
<import resource="infrastructure.xml"/>
|
||||||
|
|
||||||
<bean name="elasticsearchTemplate"
|
<bean name="elasticsearchTemplate"
|
||||||
class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
|
class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
|
||||||
<constructor-arg name="client" ref="client" />
|
<constructor-arg name="client" ref="client"/>
|
||||||
<constructor-arg name="entityMapper" ref="entityMapper"/>
|
<constructor-arg name="entityMapper" ref="entityMapper"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean name="entityMapper" class="org.springframework.data.elasticsearch.core.CustomEntityMapper"/>
|
<bean name="entityMapper" class="org.springframework.data.elasticsearch.core.CustomEntityMapper"/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user