使用resultMap实现高级结果映射

resultMap的属性:

1.属性

id:resultMap的唯一标识。
type:resulMap的映射结果类型(一般为Java实体类)。
2.子节点

id:一般对应数据库的主键 id,设置此项可以提升数据库性能。
result:映射到JavaBean的某个 “ 简单类型 ” 属性,如基础数据类型,包装类等。子节点 id 和 result 均可以实现最基本的结果集映射,将列映射到简单数据类型的属性。。这两者唯一不同的是:在比较对象实例时 id 将作为结果集的标识属性。这有助于提高总体性能,特别是应用缓存的嵌套结果映射的时候,若需要实现高级结果映射,就需要下面两个配置项:association 和 collection
association(仅处理一对一的关联关系)

  1. <resultMap type="User" id="userRoleResult">
  2.   <id property="id" column="id"/>
  3.   <result property="userName" column="userName"/>
  4.   <association property="role" javaType="Role">
  5.     <id property="roleName" column="roleName"/>
  6.   </association>
  7. </resultMap>

javaType:完整Java类名或者别名。若映射到一个JavaBean,则MyBatis通常会自行检测到其类型;若映射到一个HashMap,则应该明确指定javaType,类确保所需行为。此处为Role。
property:映射到数据库列的实体对象的属性,此处为在User实体类里定义的JavaBean对象属性(role)。association的子元素如下:
id。
result。
property:映射到数据库列的实体类对象的属性。此处为Role的属性。
column:数据库列名或者别名。
在做结果映射的过程中,要确保所有的列名都是唯一无歧义的。

collection(属性是一个集合列表)

  1. <resultMap type="User" id="userRoleResult">
  2.   <id property="id" column="id"/>
  3.   <result property="userName" column="userName"/>
  4.   <collection property="List" ofType="Address">
  5.     <id property="id" column="id"/>
  6.     <result property="postCode" column="postCode"/>
  7.   </collection>
  8. </resultMap>

ofType:完整Java类名或者别名,即集合所包含的类型,此处为Address。
property:映射数据库列的实体类对象的属性。此处为在User里定义的属性:List(可以理解为一个名为List,元素类型为Address的ArrayList集合)
collection的子元素与association基本一致。

一对多

  1. 实体
  1. package com.smbms.entity; import java.math.BigInteger; import java.util.Date; import java.util.List; /** * 角色 */
  2.  
  3. public class SmbmsRole {              
  4. private Integer rid;
  5. private String roleCode;
  6. private String roleName;
  7. private BigInteger createdBy;
  8. private Date creationDate;
  9. private BigInteger modifyBy;
  10. private Date modifyDate;
  11.  
  12. //植入多的一方 集合
  13. private List<SmbmsUser> userList;
  14.  
  15. public List<SmbmsUser> getUserList() {
  16. return userList;
  17. }
  18.  
  19. public void setUserList(List<SmbmsUser> userList) {
  20. this.userList = userList;
  21. }
  22.  
  23. public Integer getRid() {
  24. return rid;
  25. }
  26.  
  27. public void setRid(Integer rid) {
  28. this.rid = rid;
  29. }
  30.  
  31. public String getRoleCode() {
  32. return roleCode;
  33. }
  34.  
  35. public void setRoleCode(String roleCode) {
  36. this.roleCode = roleCode;
  37. }
  38.  
  39. public String getRoleName() {
  40. return roleName;
  41. }
  42.  
  43. public void setRoleName(String roleName) {
  44. this.roleName = roleName;
  45. }
  46.  
  47. public BigInteger getCreatedBy() {
  48. return createdBy;
  49. }
  50.  
  51. public void setCreatedBy(BigInteger createdBy) {
  52. this.createdBy = createdBy;
  53. }
  54.  
  55. public Date getCreationDate() {
  56. return creationDate;
  57. }
  58.  
  59. public void setCreationDate(Date creationDate) {
  60. this.creationDate = creationDate;
  61. }
  62.  
  63. public BigInteger getModifyBy() {
  64. return modifyBy;
  65. }
  66.  
  67. public void setModifyBy(BigInteger modifyBy) {
  68. this.modifyBy = modifyBy;
  69. }
  70.  
  71. public Date getModifyDate() {
  72. return modifyDate;
  73. }
  74.  
  75. public void setModifyDate(Date modifyDate) {
  76. this.modifyDate = modifyDate;
  77. }
  78. }

 DAO层

  1. package com.smbms.dao;
  2.  
  3. import com.smbms.entity.SmbmsUser;
  4.  
  5. import java.util.List;
  6.  
  7. public interface ISmbmsUserDao {
  8. //查询所有用户信息 包含角色信息
  9. public List<SmbmsUser> getUserList();
  10. }

 DAO层XML

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <!--namespace需要指向接口全路径-->
  6. <mapper namespace="com.smbms.dao.ISmbmsRoleDao">
  7. <resultMap id="roleAndUserMapper" type="SmbmsRole">
  8. <id column="rid" property="rid"></id>
  9. <result column="roleName" property="roleName"/>
  10. <!--映射多的一方 property代表实体当中多的一方的属性名 ofType代表集合当中泛型类型-->
  11. <!-- select 代表执行查询的ID column所引用的条件列 -->
  12. <collection property="userList" ofType="SmbmsUser" select="getRoleAndUserMutilSQL" column="rid">
  13.  
  14. </collection>
  15. </resultMap>
  16.  
  17. <!--写成一条sql-->
  18. <select id="getRoleAndUser" resultMap="roleAndUserMapper">
  19. select u.id,u.userName,u.userRole,r.rid,r.roleName from smbms_user as u,smbms_role as r where u.userRole=r.rid and r.rid=#{id}
  20. </select>
  21. <!--写成两条sql-->
  22. <select id="getRoleAndUser" resultMap="roleAndUserMapper">
  23. select * from smbms_role where rid=#{id}
  24. </select>
  25. <select id="getRoleAndUserMutilSQL" resultType="SmbmsUser">
  26. select * from smbms_user where userRole=#{rid}
  27. </select>
  28. </mapper>

测试

  1. package com.smbms.test;
  2.  
  3. import com.smbms.dao.ISmbmsRoleDao;
  4. import com.smbms.entity.SmbmsRole;
  5. import com.smbms.entity.SmbmsUser;
  6. import com.smbms.util.MybatisUtil;
  7. import org.apache.ibatis.session.SqlSession;
  8. import org.junit.Test;
  9.  
  10. public class CollectionTest {
  11. @Test
  12. public void getRoleAndUserTest(){
  13. SqlSession sqlSession = MybatisUtil.getSqlSession();
  14. ISmbmsRoleDao mapper = sqlSession.getMapper(ISmbmsRoleDao.class);
  15.  
  16. SmbmsRole role = mapper.getRoleAndUser(3);
  17. System.out.println("角色:"+role.getRoleName());
  18. for(SmbmsUser user : role.getUserList()){
  19. System.out.print("\t用户:"+user.getUserName());
  20. }
  21. }
  22. }

多对一 

  1. 实体
  1. package com.smbms.entity;
  2.  
  3. import java.math.BigInteger;
  4. import java.util.Date;
  5.  
  6. /**
  7. *
  8. */
  9. public class SmbmsUser {
  10. private Integer id;
  11. private String userCode;
  12. private String userName;
  13. private String userPassword;
  14. private Integer gender;
  15. private Date birthday;
  16. private String phone;
  17. private String address;
  18. private Integer userRole;
  19. private BigInteger createdBy;
  20. private Date creationDate;
  21. private BigInteger modifyBy;
  22. private Date modifyDate;
  23.  
  24. //关联一的一方
  25. private SmbmsRole role;
  26.  
  27. public SmbmsRole getRole() {
  28. return role;
  29. }
  30.  
  31. public void setRole(SmbmsRole role) {
  32. this.role = role;
  33. }
  34.  
  35. public Integer getId() {
  36. return id;
  37. }
  38.  
  39. public void setId(Integer id) {
  40. this.id = id;
  41. }
  42.  
  43. public String getUserCode() {
  44. return userCode;
  45. }
  46.  
  47. public void setUserCode(String userCode) {
  48. this.userCode = userCode;
  49. }
  50.  
  51. public String getUserName() {
  52. return userName;
  53. }
  54.  
  55. public void setUserName(String userName) {
  56. this.userName = userName;
  57. }
  58.  
  59. public String getUserPassword() {
  60. return userPassword;
  61. }
  62.  
  63. public void setUserPassword(String userPassword) {
  64. this.userPassword = userPassword;
  65. }
  66.  
  67. public Integer getGender() {
  68. return gender;
  69. }
  70.  
  71. public void setGender(Integer gender) {
  72. this.gender = gender;
  73. }
  74.  
  75. public Date getBirthday() {
  76. return birthday;
  77. }
  78.  
  79. public void setBirthday(Date birthday) {
  80. this.birthday = birthday;
  81. }
  82.  
  83. public String getPhone() {
  84. return phone;
  85. }
  86.  
  87. public void setPhone(String phone) {
  88. this.phone = phone;
  89. }
  90.  
  91. public String getAddress() {
  92. return address;
  93. }
  94.  
  95. public void setAddress(String address) {
  96. this.address = address;
  97. }
  98.  
  99. public Integer getUserRole() {
  100. return userRole;
  101. }
  102.  
  103. public void setUserRole(Integer userRole) {
  104. this.userRole = userRole;
  105. }
  106.  
  107. public BigInteger getCreatedBy() {
  108. return createdBy;
  109. }
  110.  
  111. public void setCreatedBy(BigInteger createdBy) {
  112. this.createdBy = createdBy;
  113. }
  114.  
  115. public Date getCreationDate() {
  116. return creationDate;
  117. }
  118.  
  119. public void setCreationDate(Date creationDate) {
  120. this.creationDate = creationDate;
  121. }
  122.  
  123. public BigInteger getModifyBy() {
  124. return modifyBy;
  125. }
  126.  
  127. public void setModifyBy(BigInteger modifyBy) {
  128. this.modifyBy = modifyBy;
  129. }
  130.  
  131. public Date getModifyDate() {
  132. return modifyDate;
  133. }
  134.  
  135. public void setModifyDate(Date modifyDate) {
  136. this.modifyDate = modifyDate;
  137. }
  138. }
  139.  
  140.  

  

DAO层

  1. package com.smbms.dao;
  2.  
  3. import com.smbms.entity.SmbmsUser;
  4.  
  5. import java.util.List;
  6.  
  7. public interface ISmbmsUserDao {
  8. //查询所有用户信息 包含角色信息
  9. public List<SmbmsUser> getUserList();
  10. }

  

DAO层XML

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <!--namespace需要指向接口全路径-->
  6. <mapper namespace="com.smbms.dao.ISmbmsUserDao">
  7. <resultMap id="userListAndRole" type="SmbmsUser">
  8. <id column="id" property="id"></id>
  9. <result column="userName" property="userName"/>
  10. <association property="role" javaType="SmbmsRole" select="getRole" column="userRole">
  11. <id column="rid" property="rid"></id>
  12. <result column="roleName" property="roleName"/>
  13. </association>
  14. </resultMap>
  15.  
  16. <!--<select id="getUserList" resultMap="userListAndRole">
  17. select u.id,u.userName,u.userRole,r.rid,r.roleName from smbms_user as u,smbms_role as r where u.userRole=r.rid
  18. </select>-->
  19.  
  20. <select id="getUserList" resultMap="userListAndRole">
  21. select * from smbms_user
  22. </select>
  23. <select id="getRole" resultType="SmbmsRole">
  24. select * from smbms_role where rid=#{userRole}
  25. </select>
  26. </mapper>

  

测试

  1. package com.smbms.test;
  2.  
  3. import com.smbms.dao.ISmbmsUserDao;
  4. import com.smbms.entity.SmbmsUser;
  5. import com.smbms.util.MybatisUtil;
  6. import org.apache.ibatis.session.SqlSession;
  7. import org.junit.Test;
  8.  
  9. import java.util.List;
  10.  
  11. public class AssociationTest {
  12. @Test
  13. public void getUserListTest(){
  14. SqlSession sqlSession = MybatisUtil.getSqlSession();
  15. ISmbmsUserDao mapper = sqlSession.getMapper(ISmbmsUserDao.class);
  16.  
  17. List<SmbmsUser> userList = mapper.getUserList();
  18. for(SmbmsUser user:userList){
  19. System.out.println("用户:"+user.getUserName()+"\t角色:"+user.getRole().getRoleName());
  20. }
  21. }
  22. }

  

多对多

  1. 实体
  1. package com.smbms.entity;
  2.  
  3. import java.util.List;
  4.  
  5. public class Teacher {
  6. private Integer tid;
  7. private String tname;
  8.  
  9. //植入学员集合,代表一名教员可以教授多名学员
  10. private List<Student> students;
  11.  
  12. public Integer getTid() {
  13. return tid;
  14. }
  15.  
  16. public void setTid(Integer tid) {
  17. this.tid = tid;
  18. }
  19.  
  20. public String getTname() {
  21. return tname;
  22. }
  23.  
  24. public void setTname(String tname) {
  25. this.tname = tname;
  26. }
  27.  
  28. public List<Student> getStudents() {
  29. return students;
  30. }
  31.  
  32. public void setStudents(List<Student> students) {
  33. this.students = students;
  34. }
  35. }
  36.  
  37. package com.smbms.entity;
  38.  
  39. import java.util.List;
  40.  
  41. public class Student {
  42. private Integer stuid;
  43. private String stuname;
  44. private String stuaddress;
  45.  
  46. //植入Teacher集合,代表一名学员可以被多名教员教授
  47. private List<Teacher> teachers;
  48.  
  49. public List<Teacher> getTeachers() {
  50. return teachers;
  51. }
  52.  
  53. public void setTeachers(List<Teacher> teachers) {
  54. this.teachers = teachers;
  55. }
  56.  
  57. public Integer getStuid() {
  58. return stuid;
  59. }
  60.  
  61. public void setStuid(Integer stuid) {
  62. this.stuid = stuid;
  63. }
  64.  
  65. public String getStuname() {
  66. return stuname;
  67. }
  68.  
  69. public void setStuname(String stuname) {
  70. this.stuname = stuname;
  71. }
  72.  
  73. public String getStuaddress() {
  74. return stuaddress;
  75. }
  76.  
  77. public void setStuaddress(String stuaddress) {
  78. this.stuaddress = stuaddress;
  79. }
  80. }

  

DAO层

  1. package com.smbms.dao;
  2.  
  3. import com.smbms.entity.Student;
  4.  
  5. import java.util.List;
  6.  
  7. public interface IStudentDao {
  8. //查询所有学生信息 以及授课教员
  9. public List<Student> getStudentInfo();
  10. }

  

DAO层XML

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <!--namespace需要指向接口全路径-->
  6. <mapper namespace="com.smbms.dao.IStudentDao">
  7. <resultMap id="studentAndTeacherMapper" type="Student">
  8. <id column="stuid" property="stuid"/>
  9. <result column="stuname" property="stuname"/>
  10. <collection property="teachers" ofType="Teacher">
  11. <id column="tid" property="tid"></id>
  12. <result property="tname" column="tname"/>
  13. </collection>
  14. </resultMap>
  15. <select id="getStudentInfo" resultMap="studentAndTeacherMapper">
  16. select * from student,teacher,stu_t where student.stuid=stu_t.stuid and teacher.tid=stu_t.tid
  17. </select>
  18. </mapper>

  

测试

  1. package com.smbms.test;
  2.  
  3. import com.smbms.dao.IStudentDao;
  4. import com.smbms.entity.Student;
  5. import com.smbms.entity.Teacher;
  6. import com.smbms.util.MybatisUtil;
  7. import org.apache.ibatis.session.SqlSession;
  8. import org.junit.Test;
  9.  
  10. import java.util.List;
  11.  
  12. public class ManeyTooManey {
  13. @Test
  14. public void getStudentInfo(){
  15. SqlSession sqlSession = MybatisUtil.getSqlSession();
  16. IStudentDao mapper = sqlSession.getMapper(IStudentDao.class);
  17.  
  18. List<Student> studentInfo = mapper.getStudentInfo();
  19. for(Student stu:studentInfo){
  20. System.out.println("学生:"+stu.getStuname());
  21. for (Teacher teacher:stu.getTeachers()){
  22. System.out.print("\t教员:"+teacher.getTname());
  23. }
  24. System.out.println();
  25. }
  26.  
  27. }
  28. }

  

自联接

  1. 实体
  1. package com.smbms.entity;
  2.  
  3. import java.util.List;
  4.  
  5. public class City {
  6. private Integer cid;
  7. private String cname;
  8. private Integer pid;
  9. //自关联集合 代表的是当前City对象的子集集合
  10. public List<City> childCitys;
  11.  
  12. @Override
  13. public String toString() {
  14. return "City{" +
  15. "cid=" + cid +
  16. ", cname='" + cname + '\'' +
  17. ", pid=" + pid +
  18. ", childCitys=" + childCitys +
  19. '}';
  20. }
  21.  
  22. public List<City> getChildCitys() {
  23. return childCitys;
  24. }
  25.  
  26. public void setChildCitys(List<City> childCitys) {
  27. this.childCitys = childCitys;
  28. }
  29.  
  30. public Integer getCid() {
  31. return cid;
  32. }
  33.  
  34. public void setCid(Integer cid) {
  35. this.cid = cid;
  36. }
  37.  
  38. public String getCname() {
  39. return cname;
  40. }
  41.  
  42. public void setCname(String cname) {
  43. this.cname = cname;
  44. }
  45.  
  46. public Integer getPid() {
  47. return pid;
  48. }
  49.  
  50. public void setPid(Integer pid) {
  51. this.pid = pid;
  52. }
  53.  
  54. }

  

DAO层

  1. package com.smbms.dao;
  2.  
  3. import com.smbms.entity.City;
  4.  
  5. import java.util.List;
  6.  
  7. public interface ICityDao {
  8. //查询河南省 下的所有子集
  9. public City getCityAndChildCitys(Integer cid);
  10. }

  

DAO层XML

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <!--namespace需要指向接口全路径-->
  6. <mapper namespace="com.smbms.dao.ICityDao">
  7. <resultMap id="CityAndChildCitysMapper" type="City">
  8. <id column="cid" property="cid"></id>
  9. <result column="cname" property="cname"/>
  10. <result column="pid" property="pid"/>
  11. <collection property="childCitys" ofType="City" select="getCityAndChildCitysMutilSQL" column="cid">
  12. <id column="cid" property="cid"></id>
  13. <result column="cname" property="cname"/>
  14. <result column="pid" property="pid"/>
  15. </collection>
  16. </resultMap>
  17.  
  18. <select id="getCityAndChildCitys" resultMap="CityAndChildCitysMapper">
  19. select * from city where cid=#{cid}
  20. </select>
  21. <select id="getCityAndChildCitysMutilSQL" resultMap="CityAndChildCitysMapper">
  22. select * from city where pid=#{cid}
  23. </select>
  24. </mapper>

  

测试

  1. package com.smbms.test;
  2.  
  3. import com.smbms.dao.ICityDao;
  4. import com.smbms.entity.City;
  5. import com.smbms.util.MybatisUtil;
  6. import org.apache.ibatis.session.SqlSession;
  7. import org.junit.Test;
  8.  
  9. public class DGTest {
  10. @Test
  11. public void getCityAndChildCitysTest(){
  12. SqlSession sqlSession = MybatisUtil.getSqlSession();
  13. ICityDao mapper = sqlSession.getMapper(ICityDao.class);
  14.  
  15. City city = mapper.getCityAndChildCitys(410000);
  16. System.out.println(city.toString());
  17. }
  18. }

  

使用resultMap实现高级结果映射的更多相关文章

  1. oracle使用resultMap实现高级结果映射

    resultMap的属性: 1.属性 id:resultMap的唯一标识.type:resulMap的映射结果类型(一般为Java实体类).2.子节点 id:一般对应数据库的主键 id,设置此项可以提 ...

  2. mybatis框架-使用resultMap实现高级结果映射,collection属性的使用

    需求:获取指定用户的用户信息和地址列表 修改user实体类  添加集合的引用. /** * 根绝用户id,获取该角色下的地址信息 * @param userID * @return */ public ...

  3. mybatis框架-使用resultMap实现高级结果映射,association属性

    需求:查询数特定角色下的所有用户列表 首先需要在在User类中引用Role类,因为引用了复杂的数据类型,所以要使用association属性进行映射,其实起主要作用的还是resultMap属性. /* ...

  4. Mybatis 高级结果映射 ResultMap Association Collection

    在阅读本文章时,先说几个mybatis中容易混淆的地方: 1. mybatis中的列不是数据库里的列而是查询里的列,可以是别名(如 select user_name as userName,这时col ...

  5. mybatis之高级结果映射

    先贴一句官方文档内容 如果世界总是这么简单就好了. 正如官方文档所说:如果一切都是这么简单,那该多好啊,但是实际上,我们面对的是复杂的对象,就是对象里有对象,有列表对象,总之五花八门的对象.这个时候我 ...

  6. 转:mybatis 高级结果映射(http://blog.csdn.net/ilovejava_2010/article/details/8180521)

    高级结果映射 MyBatis的创建基于这样一个思想:数据库并不是您想怎样就怎样的.虽然我们希望所有的数据库遵守第三范式或BCNF(修正的第三范式),但它们不是.如果有一个数据库能够完美映射到所有应用程 ...

  7. 使用 resultMap 实现高级结果集映射

    resultMap 的基本配置项 属性 id 属性:resultMap 的唯一标识,此 id 值用于 select 元素 resultMap 属性的引用. type 属性:表示该 resultMap ...

  8. Mybatis高级结果映射

    有时侯,我们用SQL取得的结果需要映射到类似Map<key, Bean>这样的数据结构中或是映射到多个实体类中时,我们就需要使用到resultMap.下面用3个例子说明Mybatis高级结 ...

  9. MyBatis从入门到精通(第6章):MyBatis 高级查询->6.1.2高级结果映射之一对多映射

    jdk1.8.MyBatis3.4.6.MySQL数据库5.6.45.IntelliJ IDEA 2019.3.1 本章主要包含的内容为 MyBatis 的高级结果映射,主要处理数据库一对一.一对多的 ...

随机推荐

  1. 《N诺机试指南》(二)C++自带实用函数

    1.排序sort函数: 2.查找:  实例:  3. 队列:

  2. zabbix4.0的安装与配置

    #安装zabbix监控首先的先安装LNMP环境,在这里我采用事先准备好的脚本进行安装LNMP环境 脚本内容如下: #!/bin/bash # DATE:Wed Jan # hw226234@126.c ...

  3. ELK:日志收集分析平台

    简介 ELK是一个日志收集分析的平台,它能收集海量的日志,并将其根据字段切割.一来方便供开发查看日志,定位问题:二来可以根据日志进行统计分析,通过其强大的呈现能力,挖掘数据的潜在价值,分析重要指标的趋 ...

  4. eclipse里新建work set,将项目分组放在不同文件夹

    想必大家的Eclipse里也会有这么多得工程...... 每次工作使用到的项目肯定不会太多...... 每次从这么大数量的工程当中找到自己要使用的, 必须大规模的滚动滚动条......有点不和谐了. ...

  5. os.path.join() - 忽略绝对路径前的参数

    os.path.join()会忽略第一个绝对路径之前的参数! 示例: >>> import os >>> os.path.join('/home', 'mushro ...

  6. VMware复制Linux虚拟机后网络配置

    1.启动虚拟机,点击我已复制 点击已复制后,VMware将会为重置虚拟机网卡mac地址. 2.修改网卡mac地址 3.ifconfig显示网卡名称与配置不一致处理 Centos6中ifconfig显示 ...

  7. 基于原生的 html css js php ajax做的一个 web登录和注册系统

    完整代码下载: 百度网盘地址 https://pan.baidu.com/s/1D1gqHSyjgfoOtYCZm7ofJg 提取码 :nf0b 永久有效 注意: 1 如果要正常运行此示例, 本地需要 ...

  8. 查看php相关信息

    1.最常见的就是 创建一个  php页面  ,例如 test.php,  内容如下 <?php phpinfo();?> 直接访问 这个页面,就可以看到php的 信息了 2.其它方法  直 ...

  9. 数组和CLR-非常特殊的关系

    目录 数组和CLR-非常特殊的关系 公共语言运行时(CLR)的基础 内存和类型安全 实现细节 特殊帮助器类 移除边界检查 分配数组 运行时以不同的方式对待数组 进一步阅读 数组源码引用 参考文档 数组 ...

  10. Android Studio 3.6 正式版终于发布了

    Google 下载地址 百度云 下载地址 密码:epl9 如题,Android Studio 3.6 正式版终于发布了,值得兴奋呀,毕竟 3.5 大版本更新也已经差不多半年了,撒花撒花!这次更新又更新 ...