Questions tagged [spring-mybatis]
527 questions
5
votes
0 answers
Spring boot seems could not find mybatis mapper configurations(Mapped Statements collection does not contain value)
I am working with mybatis and spring-boot.
I have been suffered for several hours with follow message.
2018-02-18 15:25:13.774 ERROR 77556 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet…

Juneyoung Oh
- 7,318
- 16
- 73
- 121
5
votes
2 answers
Flush MyBatis Cache externally (outside of mapper)
I'm using MyBatis with second level cache activated via in xml mapper files.
Suppose I want to interact with the underlying DB/DataSource decoupled from MyBatis, for instance via direct jdbcTemplate.
How can I assure, that the MyBatis…

Mahatma_Fatal_Error
- 720
- 1
- 10
- 26
4
votes
1 answer
MyBatis Spring Boot custom type handler
I need help with Spring Boot and MyBatis integration. I have an issue with custom BaseTypeHandler. I've created a mapper:
@MappedTypes({LocalDateTime.class})
public class LocalDateTimeHandler extends BaseTypeHandler {
I've added a…

Alex Lybetsky
- 41
- 1
- 1
- 4
4
votes
2 answers
How to return an Optional from MyBatis query
Is there any way to get MyBatis to return an Optional instance rather than simply a MyClass instance?

GordyB
- 179
- 4
- 14
4
votes
2 answers
MyBatis maps the attribute to the wrong Enum
My domain class has attributes mapped to an enum. Strangely MyBatis 3.4.x (Both 3.4.0 and 3.4.4. This worked with 3.3.x) with Spring MyBatis 1.3.1 tries to map it with an unrelated enum and gives the…

Gunith D
- 1,843
- 1
- 31
- 36
4
votes
0 answers
MyBatis google Guava support
I want to use google Guava collections as return types (resultType/resultMap) in MyBatis, and I wanted to know if this is supported out of the box. I did not find any official documentation regarding the same.
Are Guava collections supported as…

student for life
- 101
- 2
4
votes
3 answers
How do I set MyBatis configuration properties in an application.properties file in a Spring Boot application?
The MyBatis Spring Boot Starter documentation lists properties that can be set in the application.properties file, and that list includes:
configuration: A MyBatis Configuration bean. About available properties see the MyBatis reference page
It's…

DaveyDaveDave
- 9,821
- 11
- 64
- 77
4
votes
1 answer
Updating multiple database rows in Spring - Mybatis
I am trying to update multiple database rows. Using mybatis 3.1 and spring 3
here is my update query in mapper.xml:

Shuddh
- 1,920
- 2
- 19
- 30
4
votes
2 answers
MyBatis Batch Insert/Update Using Annotations
Please let me know, how to perform batch insert/update in mybatis using annotated mappers.

Satish Mahadevan
- 51
- 1
- 6
4
votes
0 answers
mybatis foreach with annotations
Does anybody know how the following xml configuration can be expressed with annotations?
INSERT ALL
INTO EMPLOYEE (id,name)…

Nikolay
- 1,111
- 2
- 12
- 16
3
votes
3 answers
How to solve indexOutOfBounds error in MyBatis selectForUpdate?
I use postgreSQL. Here is my request in a myBatisMapper:

Maksym Rybalkin
- 453
- 1
- 8
- 22
3
votes
1 answer
Spring Boot MVC to allow any kind of content-type in controller
I have a RestController that multiple partners use to send XML requests. However this is a legacy system that it was passed on to me and the original implementation was done in a very loose way in PHP.
This has allowed to clients, that now they…

idipous
- 2,868
- 3
- 30
- 45
3
votes
2 answers
MyBatis Parameter Not Found
I'm triying to calling a rest application but I get a 500 error. The problem maybe be on the MyBatis call but still can't fix it.
This is where I call the execution of MyBatis
@Override
public List…

Gonzalo
- 309
- 2
- 6
- 18
3
votes
2 answers
How to map EnumOrdinalTypeHandler for mybatis-spring-boot?
I am now using Mybatis with spring-boot. I didn't add mybatis-config.xml. I make all configurations for datasource and mybatis via application.properties from instructions of
mybatis-spring-boot-autoconfigure as below
### Database…

Cataclysm
- 7,592
- 21
- 74
- 123
3
votes
2 answers
jdbcType=BIGDECIMAL not supported in mybatis and ibatis
Using jdbcType=BIGDECIMAL is not supported in myBatis and ibatis and is throwing the next error:
Error resolving JdbcType. Cause: java.lang.IllegalArgumentException:
No enum constant org.apache.ibatis.type.JdbcType.BIGDECIMAL
What is the jdbcType…

Madan Thunderfist
- 193
- 1
- 2
- 14