Alias for Java class

Source: Internet
Author: User

<typeAliases>
<!--1, Typealias: alias for a Java type
Type: Specifies the class name of the type to be aliased, and the default alias is the class name lowercase; employee
Alias: Specify a new alias
-
<!--<typealias type= "Com.atguigu.mybatis.bean.Employee" alias= "emp"/>-->//alias for a single Java class

<!--2, package: Batch alias for all classes under a bundle
Name: Specifies the package name (a default alias (class name lowercase) for each class of the current package and all descendant packages below)
-
<package name= "Com.atguigu.mybatis.bean"/>

<!--3, in the case of batch alias, use @alias annotations to specify a new alias for a type--


</typeAliases>

@Alias ("EMP")
public class Employee {

Private Integer ID;
Private String LastName;
Private String Email;
Private String gender;


Public Integer getId () {
return ID;
}
public void SetId (Integer id) {
This.id = ID;
}
Public String Getlastname () {
return lastName;
}
public void Setlastname (String lastName) {
This.lastname = LastName;
}
Public String Getemail () {
return email;
}
public void Setemail (String email) {
This.email = email;
}
Public String Getgender () {
return gender;
}
public void Setgender (String gender) {
This.gender = gender;
}
@Override
Public String toString () {
Return "Employee [id=" + ID + ", lastname=" + LastName + ", email="
+ email + ", gender=" + Gender + "]";
}

}

Alias for Java class

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.