Mabitis Multi-table query (i) resulttype= "Java.util.hashMap"

Source: Internet
Author: User

1, when the single-table query, the XML tag is written as follows

When you make a multi-table query with no deterministic return type, the XML tag is written as follows:

<select id= "Volume" parametertype= "Java.util.Map" resulttype= "Java.util.HashMap" >

Because there is no corresponding type, the result of the HashMap type is returned. You need to add a java.util.HashMap reference to the DAO. Otherwise the error.

2, this bug processing. In addition, we learned to locate defects from abnormal information.

Both the error file and the error address are displayed in the exception information. Find the corresponding keyword.

For example, the information in the last part of the first error is: Failed to parse Mapping resource: ' File [D:\JavaIDESoftWare\lemapper.xml] '; Nested exception is Org.apache.ibatis.builder.BuilderException:Error parsing Mapper XML. Cause:org.apache.ibatis.builder.BuilderException:Error resolving class.  Cause:org.apache.ibatis.type.TypeException:Could not resolve type alias ' Java.util.hashMap '. Cause:java.lang.ClassNotFoundException: cannot find Class:java.util.hashMap

File lemapper.xml mapping failed, HashMap class not found. Wrote HashMap into hashmap!!!.

Locate the XML file,

The first write function returns a value of type:list<object>, so there is no error when the package Java.util.Map is not loaded. After the function has been modified by a colleague, the function return value type becomes list<map<string,object>>, so when the package is removed

Direct reporting of grammatical errors

3, the database gets the current time

MySQL SQL Server

Now ()--getdate ()

Compare full MySQL time related processing articles MySQL get time and time conversion

4. Breakpoint Processing

Baidu Experience article, delete all breakpoints. So ashamed. Unexpectedly to find Baidu experience ....

5, Bug 2 SQL statement error.

(1) unhandled time parameter, resulting in error

(2) After restoring the database, the table structure does not correspond to the

Symptoms are: (1) No Code (2) console directly prompts SQL statement error

6. Read the project Flow

Mabitis Multi-table query (i) resulttype= "Java.util.hashMap"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.