主頁 > 軟體設計 > 2021第三周mybatis框架總結

2021第三周mybatis框架總結

2021-01-25 11:35:33 軟體設計

java-SSM框架之mybatis框架總結

一.專案

1.資料庫準備

CREATE table blog(
	id VARCHAR(50) not NULL COMMENT '博客id',
	title VARCHAR(199) not null COMMENT '博客標題',
	author varchar(30) not null COMMENT '博客作者',
	createTime datetime not NULL COMMENT '創建時間',
	views int(30) not null COMMENT '瀏覽量'
) ENGINE=INNODB DEFAULT CHARSET=utf8

SHOW tables;

SELECT * from blog;

use mybatis;

CREATE table teacher(
	id int(10) not NULL,
	`name` varchar(30) DEFAULT NULL,
	PRIMARY key(id)
)ENGINE=INNODB DEFAULT charset=utf8;

insert into teacher(id,name) values(1,'秦老師');

CREATE table student(
	id int(10) not NULL,
	`name` VARCHAR(30) DEFAULT NULL,
	tid int(10) DEFAULT NULL,
	PRIMARY key(id),
	KEY fktid (tid),
	CONSTRAINT fktid FOREIGN key(tid) REFERENCES teacher (id)
)ENGINE=INNODB DEFAULT charset=utf8;

insert into student(id,name,tid) values
(1,'小明',1),
(2,'小王',1),
(3,'小李',1),
(4,'小廖',1),
(5,'小周',1)

2.idea環境搭建

在這里插入圖片描述

父模塊下prom.xml匯入jar包,通過繼承后面創建的子專案都擁有這些jar包

工程目錄

在這里插入圖片描述

父porm.xml和子porm.xml要點示例

//父porm.xml有子模塊的架構
<modules>
    <module>mybatis-01</module>
    <module>mybatis-03</module>
    <module>mybatis-04</module>
    <module>mybatis-1more</module>
    <module>mybatis-project</module>
</modules>
//子porm.xml有父模塊的標記
<parent>
    <artifactId>Mybatis-Study</artifactId>
    <groupId>org.example</groupId>
    <version>1.0-SNAPSHOT</version>
</parent>
//解決資源檔案無法被匯出到target
<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
    </resources>
</build>

mybatis.config.xml核心組態檔

注意:此處配置順序有規定!

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
//讀取資料庫屬性組態檔db.properties
    <properties resource="db.properties"/>
//設定日志和資料表欄位與物體類的駝峰和下劃線互轉的配置
    <settings>
        <setting name="logImpl" value="STDOUT_LOGGING"/>
        <setting name="mapUnderscoreToCamelCase" value="true" />
    </settings>
//屬性配置之別名優化
    <typeAliases>
        <package name="com.com.huang.pojo"/>
    </typeAliases>
//配置運行的環境
    <environments default="development">
        <environment id="development">
            <transactionManager type="JDBC"/>
            <dataSource type="POOLED">
                <property name="driver" value="${driver}"/>
                <property name="url" value="${url}"/>
                <property name="username" value="${username}"/>
                <property name="password" value="${password}"/>
            </dataSource>
        </environment>
    </environments>
//Mapper介面對應的xml檔案必須要在此處注冊,有三種寫法
//我們通常使用class,但前提是Mapper介面和對應的xml檔案在一個包下,且名字一樣
    <mappers>
        <mapper class="com.com.huang.dao.StudentMapper"/>
        <mapper class="com.com.huang.dao.TeacherMapper"/>
    </mappers>
</configuration>

MybatisUtils工具類獲取sqlSession物件

package com.huang.utils;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;

public class MybatisUtils {
    public static SqlSessionFactory sqlSessionFactory;
    static {
        try {
            InputStream inputStream = Resources.getResourceAsStream("mybatis.config.xml");
            sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    //此處設定布林值true,增刪改就無需sqlSession.commit()提交事務了
    public static SqlSession getSqlSession(){
        return sqlSessionFactory.openSession(true);
    }
}

資料庫屬性組態檔db.properties

driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/${需要連接的資料庫名如:mybatis}?useSSL=true&amp;useUnicode=true&amp;characterEncoding=UTF-8
username=${資料庫用戶名}
password=${資料庫密碼}

Mapper介面示例

package com.huang.dao;
import com.huang.pojo.Student;
import java.util.List;

public interface StudentMapper {
//    多對一(學生對老師)的處理---按照查詢嵌套處理
    List<Student> getStudent();
//    多對一(學生對老師)的處理---按照查詢嵌套處理
    List<Student> getStudent2();
}

Mapper介面對應的xml檔案示例
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        //namespace為相對路徑下的Mapper介面
<mapper namespace="com.huang.dao.StudentMapper">
    //此處撰寫sql陳述句,示例
    <select id="getStudent" resultMap="StudentTeacher">
        select * from mybatis.student;
    </select>
</mapper>

補充lombok插件的配置

1.安裝lombok插件
2.在子porm.xml中配置依賴

<dependencies>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.10</version>
    </dependency>
</dependencies>

3.使用注解@Data即可,見物體類使用

完成了以上環境搭建,我們可以開始測驗了

1.測驗目錄

在這里插入圖片描述

2.測驗類示例

//    測驗環境搭建成功
@Test
public void test1(){
    SqlSession sqlSession = MybatisUtils.getSqlSession();
    TeacherMapper mapper = sqlSession.getMapper(TeacherMapper.class);
    List<Teacher> teacherList = mapper.getTeacher();
    for (Teacher teacher : teacherList) {
        System.out.println(teacher);
    }
    sqlSession.close();
}

3.多對一的處理

物體類pojo

package com.huang.pojo;
import lombok.Data;
@Data
public class Teacher {
    private int id;
    private String name;
}
package com.huang.pojo;
import lombok.Data;
@Data
public class Student {
    private int id;
    private String name;
//    外鍵關聯的老師物件
    private Teacher teacher;
}

1.按照查詢嵌套處理

<select id="getStudent" resultMap="StudentTeacher">
    select * from mybatis.student;
</select>
<resultMap id="StudentTeacher" type="Student">
    <result property="id" column="id"/>
    <result property="name" column="name"/>
    //注意一下固定寫法
    <association property="teacher" column="tid" javaType="teacher" select="getSTeacher"/>
</resultMap>
// #{tid}中tid可以為任何內容
<select id="getSTeacher" resultType="Teacher">
    select * from mybatis.teacher where id = #{tid};
</select>

2.按照結果嵌套處理

<select id="getStudent2" resultMap="Student2Teacher2">
    select s.id sid,s.name sname,t.name tname from mybatis.student s,mybatis.teacher t where s.tid = t.id;
</select>
<resultMap id="Student2Teacher2" type="student">
    <result property="id" column="sid"/>
    <result property="name" column="sname"/>
    <association property="teacher" javaType="teacher">
        <result property="name" column="tname"/>
    </association>
</resultMap>

4.多對一的處理(以下對應的mapper和xml檔案沒有給出)

物體類pojo

package com.huang.pojo;
import lombok.Data;
@Data
public class Teacher {
    private int id;
    private String name;
    private List<Student> students;
}
package com.huang.pojo;
import lombok.Data;
@Data
public class Student {
    private int id;
    private String name;
    private int tid;
}

1.按照查詢嵌套處理

<select id="getTeacher2" resultMap="TeacherStudent2">
    select * from mybatis.teacher where id = #{id};
</select>
<resultMap id="TeacherStudent2" type="Teacher"
    <collection property="students" column="id" javaType="ArrayList" ofType="Student" select="getStudentByTeacherId"/>
</resultMap>
// #{id}中id可以為任何內容
<select id="getStudentByTeacherId" resultType="Student">
    select * from mybatis.student where tid = #{id};
</select>

2.按照結果嵌套處理

<select id="getTeacher" resultMap="TeacherStudent">
   select s.id sid,s.name sname,t.name tname,t.id tid
   from student s,teacher t
   where s.tid = t.id and t.id = #{id};
</select>
<resultMap id="TeacherStudent" type="Teacher">
    <result property="id" column="tid"/>
    <result property="name" column="tname"/>
    <collection property="students" ofType="Student">
        <result property="id" column="sid"/>
        <result property="name" column="sname"/>
        <result property="tid" column="tid"/>
    </collection >
</resultMap>

5.動態sql

1.if陳述句

<select id="getStudent" resultType="student"> 
    SELECT * FROM mybatis.student
<if test="name!=null">
    AND name = #{name}
</if>   
</select>

2.where標簽

<select id="getStudent" resultType="student" parameterType="map">
    SELECT * mybatis.student
    //where會自動添加或者洗掉and,choose和when滿足一個就不會繼續往后,
    //類似switch,case/break
<where>
    <choose>
        <when test="name!= null">
        	AND name = #{name}
        </when>
        <when test="tid != null">
        	AND tid =#{tid }
        </when>
        <otherwise>
        	AND  id= "2"
        </otherwise>
    </choose>
</where>
</select>

3.set標簽

<update id="updateEmprById2" parameterType="emp">
    UPDATE mybatis.student
    //set會自動添加或者洗掉,保證sql陳述句的合法性
    <set>
        <if test="name!=null"> name=#{name},</if>
        <if test="tid!=null"> tid=#{tid},</if>
    </set>
    where id = #{id}
</update>

6.補充一些點

一.mybatis實作分頁方式1

//1.介面
List<User> getUserListByLimit(Map<String,Integer> map);

//2.mapper.xml配置
//配合使用結果集映射,解決欄位名不一致的問題
<resultMap id="UserMap" type="user">
    <result property="password" column="pwd"/>
</resultMap>
<select id="getUserListByLimit" resultMap="UserMap">
    select * from mybatis.user limit #{startIndex},#{pageSize};
</select>

//3.測驗類
@Test
public void testLimit(){
    SqlSession sqlSession = MybatisUtils.getSqlSession();
    UserDao userdao = sqlSession.getMapper(UserDao.class);
    Logger logger = Logger.getLogger(UserDaoTest.class);
    logger.info("info:用分頁來查詢資料");
    HashMap<String, Integer> map = new HashMap<>();
    map.put("startIndex",0);
    map.put("pageSize",2);
    List<User> userList = userdao.getUserListByLimit(map);
    for (User user : userList) {
        System.out.println(user);
    }
    sqlSession.close();
}

二.mybatis實作分頁方式2

//1.介面
List<User> getUserListByRowBounds();

//2.mapper.xml配置
//配合使用結果集映射
<resultMap id="UserMap" type="user">
    <result property="password" column="pwd"/>
</resultMap>
<select id="getUserListByRowBounds" resultMap="UserMap">
//此處要查詢全部
    select * from mybatis.user;
</select>

//3.測驗類
@Test
public void testRowBounds(){
    SqlSession sqlSession = MybatisUtils.getSqlSession();

//        RowBounds實作
    RowBounds rowBounds = new RowBounds(0, 1);
    logger.info("info:使用RowBounds來進行分頁");
//        Java代碼層面實作分頁 這里是sqlSession執行sql語言的第二種方式,(不推薦)
    List<User> userList = sqlSession.selectList("com.huang.dao.UserDao.getUserListByRowBounds", null, rowBounds);
    for (User user : userList) {
        System.out.println(user);
    }
    sqlSession.close();
} 

三.模糊查詢

//Mapper介面
List<User> getUserListByNameLike(String name);
//模糊查詢
<select id="getUserListByNameLike" resultType="user">
    select * from mybatis.user where name like concat("%",#{name},"%");
</select>
//測驗類
@Test
public void testLike(){
    SqlSession sqlSession = MybatisUtils.getSqlSession();
    UserDao userDao = sqlSession.getMapper(UserDao.class);
    //測驗模糊查詢
    //方式一:List<User> userList = userDao.getUserListByNameLike("%王%");
    List<User> userList = userDao.getUserListByNameLike("王");
    for (User user : userList) {
        System.out.println(user);
    }
    sqlSession.close();
}

四.map引數

//Mapper介面
List<User> getUserListById2(Map<String,Object> map);
//使用map可以自定義引數名
<select id="getUserListById2" resultType="user" parameterType="map">
    select * from mybatis.user where id = #{selfDefinedField};
</select>
//測驗類
@Test
public void test0(){
    SqlSession sqlSession = MybatisUtils.getSqlSession();
    UserDao userDao = sqlSession.getMapper(UserDao.class);
    HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("selfDefinedField",5);
    List<User> userList = userDao.getUserListById2(map);
    for (User user : userList) {
        System.out.println(user);
    }
    sqlSession.close();
}

五.注解

//增加一個用戶 注解適用于簡單的業務邏輯
@Insert("insert into user(id,name,pwd) values(#{id},#{name},#{password})")
int insertUser(User user);
六.Log4j日志
1.匯入jar包
<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>
2.在resource下新建log4j.properties組態檔
# priority  :debug<info<warn<error
#you cannot specify every priority with different file for log4j
log4j.rootLogger=debug,stdout,info,debug,warn,error 

#console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender 
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 
log4j.appender.stdout.layout.ConversionPattern= [%d{yyyy-MM-dd HH:mm:ss a}]:%p %l%m%n
#info log
log4j.logger.info=info
log4j.appender.info=org.apache.log4j.DailyRollingFileAppender 
log4j.appender.info.DatePattern='_'yyyy-MM-dd'.log'
log4j.appender.info.File=./src/log/info.log
log4j.appender.info.Append=true
log4j.appender.info.Threshold=INFO
log4j.appender.info.layout=org.apache.log4j.PatternLayout 
log4j.appender.info.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss a} [Thread: %t][ Class:%c >> Method: %l ]%n%p:%m%n
#debug log
log4j.logger.debug=debug
log4j.appender.debug=org.apache.log4j.DailyRollingFileAppender 
log4j.appender.debug.DatePattern='_'yyyy-MM-dd'.log'
log4j.appender.debug.File=./src/log/debug.log
log4j.appender.debug.Append=true
log4j.appender.debug.Threshold=DEBUG
log4j.appender.debug.layout=org.apache.log4j.PatternLayout 
log4j.appender.debug.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss a} [Thread: %t][ Class:%c >> Method: %l ]%n%p:%m%n
#warn log
log4j.logger.warn=warn
log4j.appender.warn=org.apache.log4j.DailyRollingFileAppender 
log4j.appender.warn.DatePattern='_'yyyy-MM-dd'.log'
log4j.appender.warn.File=./src/log/warn.log
log4j.appender.warn.Append=true
log4j.appender.warn.Threshold=WARN
log4j.appender.warn.layout=org.apache.log4j.PatternLayout 
log4j.appender.warn.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss a} [Thread: %t][ Class:%c >> Method: %l ]%n%p:%m%n
#error
log4j.logger.error=error
log4j.appender.error = org.apache.log4j.DailyRollingFileAppender
log4j.appender.error.DatePattern='_'yyyy-MM-dd'.log'
log4j.appender.error.File = ./src/log/error.log 
log4j.appender.error.Append = true
log4j.appender.error.Threshold = ERROR 
log4j.appender.error.layout = org.apache.log4j.PatternLayout
log4j.appender.error.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss a} [Thread: %t][ Class:%c >> Method: %l ]%n%p:%m%n
3.在mybatis.config.xml核心組態檔中配置
<settings>
    <setting name="logImpl" value="LOG4J"/>
    //解決駝峰轉資料庫中的_
    <setting name="mapUnderscoreToCamelCase" value="true"/> 
</settings>
4.在測驗類中測驗
static Logger logger = Logger.getLogger(類物件【Student.class】)
logger.info("info:進入了資訊輸出");
logger.debug("debug:進入了debug階段");
logger.error("error:進入了error階段");


@Test
public void test1(){
    SqlSession sqlSession = MybatisUtils.getSqlSession();
    UserDao userdao = sqlSession.getMapper(UserDao.class);
    List<User> userlist = userdao.getUserListById(1);
    logger.info("info:進入了資訊輸出");
    for (User user : userlist) {
        System.out.println(user);
    }
    sqlSession.close();
}

@Test
public void test2(){
    logger.info("info:進入了資訊輸出");
}
5.最后會在log4j.properties指定的位置生成日志檔案

在這里插入圖片描述

轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/252169.html

標籤:其他

上一篇:配置springcloud配置中心讀取github上的組態檔報錯:com.jcraft.jsch.JSchException: Auth fail解決方案

下一篇:c#入門學習

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 面試突擊第一季,第二季,第三季

    第一季必考 https://www.bilibili.com/video/BV1FE411y79Y?from=search&seid=15921726601957489746 第二季分布式 https://www.bilibili.com/video/BV13f4y127ee/?spm_id_fro ......

    uj5u.com 2020-09-10 05:35:24 more
  • 第三單元作業總結

    1.前言 這應該是本學期最后一次寫作業總結了吧。總體來說,對作業的節奏也差不多掌握了,作業做起來的效率也更高了。雖然和之前的作業一樣,作業中都要用到新的知識,但是相比之前,更加懂得了如何利用工具以及資料。雖然之間卡過殼,但總體而言,這幾次作業還算完成的比較好。 2.作業程序總結 相比前兩個單元,此單 ......

    uj5u.com 2020-09-10 05:35:41 more
  • 北航OO(2020)第四單元博客作業暨課程總結博客

    北航OO(2020)第四單元博客作業暨課程總結博客 本單元作業的架構設計 在本單元中,由于UML圖具有比較清晰的樹形結構,因此我對其中需要進行查詢操作的元素進行了包裝,在樹的父節點中存盤所有孩子的參考。考慮到性能問題,我采用了快取機制,一次查詢后盡可能快取已經遍歷過的資訊,以減少遍歷次數。 本單元我 ......

    uj5u.com 2020-09-10 05:35:48 more
  • BUAA_OO_第四單元

    一、UML決議器設計 ? 先看下題目:第四單元實作一個基于JDK 8帶有效性檢查的UML(Unified Modeling Language)類圖,順序圖,狀態圖分析器 MyUmlInteraction,實際上我們要建立一個有向圖模型,UML中的物件(元素)可能與同級元素連接,也可與低級元素相連形成 ......

    uj5u.com 2020-09-10 05:35:54 more
  • 6.1邏輯運算子

    邏輯運算子 1. && 短路與 運算式1 && 運算式2 01.運算式1為true并且運算式2也為true 整體回傳為true 02.運算式1為false,將不會執行運算式2 整體回傳為false 03.只要有一個運算式為false 整體回傳為false 2. || 短路或 運算式1 || 運算式2 ......

    uj5u.com 2020-09-10 05:35:56 more
  • BUAAOO 第四單元 & 課程總結

    1. 第四單元:StarUml檔案決議 本單元采用了圖模型決議UML。 UML檔案可以抽象為圖、子圖、邊的邏輯結構。 在實作中,圖的節點包括類、介面、屬性,子圖包括狀態圖、順序圖等。 采用了三次遍歷UML元素的方法建圖,第一遍遍歷建點,第二、三次遍歷設定屬性、連邊,實作圖物件的初始化。這里借鑒了一些 ......

    uj5u.com 2020-09-10 05:36:06 more
  • 談談我對C# 多型的理解

    面向物件三要素:封裝、繼承、多型。 封裝和繼承,這兩個比較好理解,但要理解多型的話,可就稍微有點難度了。今天,我們就來講講多型的理解。 我們應該經常會看到面試題目:請談談對多型的理解。 其實呢,多型非常簡單,就一句話:呼叫同一種方法產生了不同的結果。 具體實作方式有三種。 一、多載 多載很簡單。 p ......

    uj5u.com 2020-09-10 05:36:09 more
  • Python 資料驅動工具:DDT

    背景 python 的unittest 沒有自帶資料驅動功能。 所以如果使用unittest,同時又想使用資料驅動,那么就可以使用DDT來完成。 DDT是 “Data-Driven Tests”的縮寫。 資料:http://ddt.readthedocs.io/en/latest/ 使用方法 dd. ......

    uj5u.com 2020-09-10 05:36:13 more
  • Python里面的xlrd模塊詳解

    那我就一下面積個問題對xlrd模塊進行學習一下: 1.什么是xlrd模塊? 2.為什么使用xlrd模塊? 3.怎樣使用xlrd模塊? 1.什么是xlrd模塊? ?python操作excel主要用到xlrd和xlwt這兩個庫,即xlrd是讀excel,xlwt是寫excel的庫。 今天就先來說一下xl ......

    uj5u.com 2020-09-10 05:36:28 more
  • 當我們創建HashMap時,底層到底做了什么?

    jdk1.7中的底層實作程序(底層基于陣列+鏈表) 在我們new HashMap()時,底層創建了默認長度為16的一維陣列Entry[ ] table。當我們呼叫map.put(key1,value1)方法向HashMap里添加資料的時候: 首先,呼叫key1所在類的hashCode()計算key1 ......

    uj5u.com 2020-09-10 05:36:38 more
最新发布
  • 【中介者設計模式詳解】C/Java/JS/Go/Python/TS不同語言實作

    * 中介者模式是一種行為型設計模式,它可以用來減少類之間的直接依賴關系,
    * 將物件之間的通信封裝到一個中介者物件中,從而使得各個物件之間的關系更加松散。
    * 在中介者模式中,物件之間不再直接相互互動,而是通過中介者來中轉訊息。 ......

    uj5u.com 2023-04-20 08:20:47 more
  • 露天煤礦現場調研和交流案例分享

    他們集團的資訊化公司及研究院在一個礦區正在做智能礦山的統一平臺的 試點,專案投資大概1億,包括了礦山的各方面的內容,顯示得我們這次交流有點多余。他們2年前開始做智能礦山的規劃,有很多煤礦行業專家的加持,他們的描述是非常完美,但是去年底應該上線的平臺,現在還沒有看到影子。他們確實有很多場景需求,但是被... ......

    uj5u.com 2023-04-20 08:20:25 more
  • 《社區人員管理》實戰案例設計&個人案例分享

    設計是一個讓人夢想成真程序,開始編碼、測驗、除錯之前進行需求分析和架構設計,才能保證關鍵方面都做正確 ......

    uj5u.com 2023-04-20 08:20:17 more
  • 軟體架構生態化-多角色交付的探索實踐

    作為一個技術架構師,不僅僅要緊跟行業技術趨勢,還要結合研發團隊現狀及痛點,探索新的交付方案。在日常中,你是否遇到如下問題 “ 業務需求排期長研發是瓶頸;非研發角色感受不到研發技改提效的變化;引入ISV 團隊又擔心質量和安全,培訓周期長“等等,基于此我們探索了一種新的技術體系及交付方案來解決如上問題。 ......

    uj5u.com 2023-04-20 08:20:10 more
  • 【中介者設計模式詳解】C/Java/JS/Go/Python/TS不同語言實作

    * 中介者模式是一種行為型設計模式,它可以用來減少類之間的直接依賴關系,
    * 將物件之間的通信封裝到一個中介者物件中,從而使得各個物件之間的關系更加松散。
    * 在中介者模式中,物件之間不再直接相互互動,而是通過中介者來中轉訊息。 ......

    uj5u.com 2023-04-20 08:19:44 more
  • 露天煤礦現場調研和交流案例分享

    他們集團的資訊化公司及研究院在一個礦區正在做智能礦山的統一平臺的 試點,專案投資大概1億,包括了礦山的各方面的內容,顯示得我們這次交流有點多余。他們2年前開始做智能礦山的規劃,有很多煤礦行業專家的加持,他們的描述是非常完美,但是去年底應該上線的平臺,現在還沒有看到影子。他們確實有很多場景需求,但是被... ......

    uj5u.com 2023-04-20 08:19:07 more
  • 《社區人員管理》實戰案例設計&個人案例分享

    設計是一個讓人夢想成真程序,開始編碼、測驗、除錯之前進行需求分析和架構設計,才能保證關鍵方面都做正確 ......

    uj5u.com 2023-04-20 08:18:57 more
  • 軟體架構生態化-多角色交付的探索實踐

    作為一個技術架構師,不僅僅要緊跟行業技術趨勢,還要結合研發團隊現狀及痛點,探索新的交付方案。在日常中,你是否遇到如下問題 “ 業務需求排期長研發是瓶頸;非研發角色感受不到研發技改提效的變化;引入ISV 團隊又擔心質量和安全,培訓周期長“等等,基于此我們探索了一種新的技術體系及交付方案來解決如上問題。 ......

    uj5u.com 2023-04-20 08:18:49 more
  • 05單件模式

    #經典的單件模式 public class Singleton { private static Singleton uniqueInstance; //一個靜態變數持有Singleton類的唯一實體。 // 其他有用的實體變數寫在這里 //構造器宣告為私有,只有Singleton可以實體化這個類! ......

    uj5u.com 2023-04-19 08:42:51 more
  • 【架構與設計】常見微服務分層架構的區別和落地實踐

    軟體工程的方方面面都遵循一個最基本的道理:沒有銀彈,架構分層模型更是如此,每一種都有各自優缺點,所以請根據不同的業務場景,并遵循簡單、可演進這兩個重要的架構原則選擇合適的架構分層模型即可。 ......

    uj5u.com 2023-04-19 08:42:41 more