I have a spring boot application code from controller to dao in which I execute queries in mybatis/xml files. I want to pass the entire query as a variable to the dao and then it should get executed in mybatis and the result gets stored in the calling variable in dao? The query would be a select statement with hardcoded parameters How can I do that?
Dynamic query execution in mybatis/xml file
337 Views Asked by Monika Gupta At
1
There are 1 best solutions below
Related Questions in SPRING-MYBATIS
- PropertyPlaceholderConfigurers loading after parameterized DataSource bean
- Converting Ibatis to Mybatis
- mybatis foreach with annotations
- How to Pass Array to String to IN Clause Using MyBatis annotation
- mybatis integer data update, no effect
- MyBatis collection property
- @Transaction not working on multi datasource Spring Boot + MyBatis application
- Connections remain in idle status and increase untill reached max connections limit
- how to configure swagger in web.xml
- mybatis-spring & spring boot - Could not resolve type alias issue
- How to specify the character encoding of Mybatis?
- How to use mybatis annotations to implement relation query
- mybatis 3 + spring : Can I put a collection result into two groups based on a column value from the query result
- Spring 2.3.4.RELEASE, Mybatis.Spring.boot 2.1.3 : Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
- What is resultType for bytea column of postgres while retrieving using mbatis mapper?
Related Questions in MYBATIS-SQL
- With MyBatis. How can I map two different records in one table, then construct a single query result when joining that table?
- Mybatis, pass muliple list as parametres
- How to I update property table reffered in mybatis
- MyBatis mapping collection inside association
- Dynamic query execution in mybatis/xml file
- Mybatis spring boot how to create dynamic update query
- Unable to insert the batch in sql via MyBatis
- Using Environment variables in Mybatis properties file
- Mybatis mapper list return the result repetition
- Mybatis Insert PK manually
- Using column alias in Mybatis3 Dynamic SQL
- Getting Map<Long, List<Object>> using MyBatis
- Checking property existence of include fragment in MyBatis
- What parameters are parsed the first in myBatis mapper, # or $ ones?
- Mybatis returningHashMap
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You probably did something else by now, but you can write a mapper with a
sqlparameter and the following in the xml: