-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Description
I know there is already an issue at #218 and solution is:
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- .... -->
<property name="typeHandlers">
<array>
<bean class="com.example.YurCustomTypeHandler">
<property name="aProperty" ref="aBean"/>
</bean>
</array>
</property>
</bean>But I think bellow is better because now is 2020 and we should use Java Configuration.
public class JsonObjectArrayHandler extends BaseTypeHandler<List<Gallery>> {
private final ObjectMapper objectMapper;
public JsonObjectArrayHandler(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}And then in application.yml of Spring Boot application:
mybatis:
type-handlers-package: com.example.handlerPlease add support for this.
Thank you so much!
bedla, adrianboimvaser, fd8783, deka6pb, Zilljian and 5 more
Metadata
Metadata
Assignees
Labels
No labels