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
338 Views Asked by Monika Gupta At
1
There are 1 best solutions below
Related Questions in SPRING-MYBATIS
- Why can't I correctly use ibatis
- How to enable transaction logging in a Springboot&MyBatis project?
- Return value of forech statement in mybatis
- mybatis resultMapping not working when order of field names are changed
- Failed to map to class with member objects when used with Lombok
- How to reference from another file?
- @MockBean not working for mybatis repositories after upgrading spring boot version from 2.1 to 2.3
- How can I avoid Mybatis reloading configuration for every `SqlSessionTemplate`?
- MyBatis update annotation failed - ORACLE ERROR ORA-00933
- What is resultType for bytea column of postgres while retrieving using mbatis mapper?
- Cannot delete a record using Mybatis
- Mybatis - nested lazy loaded result property is already exist on result map issue
- MyBatis xml update query using set tag throws org.springframework.jdbc.BadSqlGrammarException
- Excluding AutoConfigureTestDatabase from MybatisTest not working
- How to use conditional where clauses with Mybatis using annotations?
Related Questions in MYBATIS-SQL
- Mybatis - nested lazy loaded result property is already exist on result map issue
- MyBatis TypeException when using <foreach>
- Using column alias in Mybatis3 Dynamic SQL
- Error: Caused by: java.io.FileNotFoundException: class path resource [SqlMapConfig.xml] cannot be opened because it does not exist
- MyBatis SDO_NN inject parameter exception
- resultMap in mybatis , I need to pass a List of Strings as return type. How to do this in the mapper file
- Mybatis, pass muliple list as parametres
- Can mybatis dynamic sql operate data queried from sql?
- how to directly add ENUM in Mybatis IN query ,with no params
- MyBatis dynamically including script
- How to populate values to Map of a POJO in MyBatis
- Mybatis mapper list return the result repetition
- Mybatis returningHashMap
- MyBatis mapping collection inside association
- Mybatis Insert PK manually
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 # Hahtags
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: