主頁 > 軟體設計 > ApplicationContext和ConfigurableApplicationContext決議

ApplicationContext和ConfigurableApplicationContext決議

2021-02-05 13:51:42 軟體設計

既然介紹這兩個介面,自然要知道這兩個介面在IOC整個體系中的位置和兩者之間的聯系,

ApplicationContext定了高級容器的基本規范,其實他也不是直接繼承BeanFactory基礎容器,可以看到ApplicationContext直接父介面對BeanFactory進行很多拓展其中就包括:

  • 時間的注冊和發布
  • 訊息決議
  • 資源決議
  • Bean工廠層級管理
  • 監聽器
  • 容器環境
    通過以上拓展,我們基本可以知道高級IOC容器有哪些特點,這也是學習整個ApplicationContext容器重點了解的部分,

再比較ApplicationContext和ConfigurableApplicationContext定義的方法以及下圖層級關系,ConfigurableApplicationContext是ApplicationContext的子介面,也就包含了ApplicationContext,通過方法可以知道,ConfigurableApplicationContext重在對各種屬性的配置,而ApplicationContext介面主要各種屬性的get方法,

Spring這種將get和set分開到兩個介面的設計增大了屬性設定和獲取的靈活性,將兩者分開也更加清晰,在以后的解決方案設計中,可以參考,將配置資訊和獲取資訊分開,兩者互不干擾,在保證重要的基礎屬性不變的情況,可以按需進行拓展,其實Spring的框架設計中應用了大量的裝飾者模式,這也是高拓展點的需要
在這里插入圖片描述

1. ApplicationContext

該類提供了高級IOC規范
其中有幾個注意點:

  • 從ListableBeanFactory介面繼承來的:用于訪問應用組件的工廠方法
  • 從ResourceLoader介面繼承來的:用通用的方式加載檔案資源
  • 從ApplicationEventPublisher介面繼承來的:注冊和發布事件
  • 從MessageSource介面繼承來的:處理訊息,支持國際化

從父應用背景關系定義的在子背景關系中將始終保持優先,

public interface ApplicationContext extends EnvironmentCapable, ListableBeanFactory, HierarchicalBeanFactory,
		MessageSource, ApplicationEventPublisher, ResourcePatternResolver {

	/**
	 * 回傳一個唯一的應用背景關系id
	 * @return the unique id of the context, or {@code null} if none
	 */
	@Nullable
	String getId();

	/**
	 * 回傳已經部署的該應用背景關系的名稱.
	 * @return a name for the deployed application, or the empty String by default
	 */
	String getApplicationName();

	/**
	 * 回傳此背景關系友好的名稱---這有什么用呢?
	 * @return a display name for this context (never {@code null})
	 */
	String getDisplayName();

	/**
	 * 回傳該背景關系第一次被加載的時間戳
	 * @return the timestamp (ms) when this context was first loaded
	 */
	long getStartupDate();

	/**
	 *回傳父應用背景關系, 如果沒有父背景關系,該背景關系就是在背景關系層次的根
	 * @return the parent context, or {@code null} if there is no parent
	 */
	@Nullable
	ApplicationContext getParent();


	AutowireCapableBeanFactory getAutowireCapableBeanFactory() throws IllegalStateException;

}

這其中對AutowireCapableBeanFactory getAutowireCapableBeanFactory()方法有疑惑,然后網上百度了一下,Spring提供了一種機制,能夠為第三方框架賦能,讓Spring去管理的Bean去裝配和填充那些沒有被SpringIOC管理的bean,也就是Spring提供了使用第三方框架的能力,能夠做到無縫的將第三方框架整合到Spring中來進行使用,Junit與Quartz借用了這種機制為自己賦能,

2. ConfigurableApplicationContext

整體結構圖
在這里插入圖片描述
這個圖可以看出,ConfigurableApplicationContext是ApplicationContext的子類,該介面的主要任務就是配置應用程式背景關系功能,

/**
 * SPI interface to be implemented by most if not all application contexts.
 * Provides facilities to configure an application context in addition
 * to the application context client methods in the
 * {@link org.springframework.context.ApplicationContext} interface.
 *
 * <p>Configuration and lifecycle methods are encapsulated here to avoid
 * making them obvious to ApplicationContext client code. The present
 * methods should only be used by startup and shutdown code.
 * ~~~~~~~~~~~~~~~~~~~~~~~~
 * 中文解釋:
 * SPI介面將由大多數(而不是全部)應用程式背景關系實作, 
 * 除了ApplicationContext介面中的ApplicationContext程式背景關系客戶端方法外,
 * 還提供了配置應用程式背景關系的功能,
 * 配置和生命周期方法在此處進行了封裝,以避免對ApplicationContext客戶端代碼顯而易見, 
 * 本方法僅應由啟動和關閉代碼使用
 * ~~~~~~~~~~~~~~~~~~~~~~~~
 *
 * @author Juergen Hoeller
 * @author Chris Beams
 * @author Sam Brannen
 * @since 03.11.2003
 */

具體分析

1. 硬性基礎屬性配置

除了第一個之外,其他的都是將在bean工廠中bean名稱為雙引號小寫的bean的名稱改成左邊的大寫,至于為什么要這樣設定,我還沒理解?

/**
	 * Any number of these characters are considered delimiters between
	 * multiple context config paths in a single String value.
	 * 在單個String值中,可以將任意數量的這些字符視為多個背景關系配置路徑之間的分隔符,
	 * 就是設定多個應用背景關系組態檔的的分隔符
	 * @see org.springframework.context.support.AbstractXmlApplicationContext#setConfigLocation
	 * @see org.springframework.web.context.ContextLoader#CONFIG_LOCATION_PARAM
	 * @see org.springframework.web.servlet.FrameworkServlet#setContextConfigLocation
	 */
	String CONFIG_LOCATION_DELIMITERS = ",; \t\n";

	/**
	 * Name of the ConversionService bean in the factory.
	 * If none is supplied, default conversion rules apply.
	 * @since 3.0
	 * @see org.springframework.core.convert.ConversionService
	 */
	String CONVERSION_SERVICE_BEAN_NAME = "conversionService";

	/**
	 * Name of the LoadTimeWeaver bean in the factory. If such a bean is supplied,
	 * the context will use a temporary ClassLoader for type matching, in order
	 * to allow the LoadTimeWeaver to process all actual bean classes.
	 * @since 2.5
	 * @see org.springframework.instrument.classloading.LoadTimeWeaver
	 */
	String LOAD_TIME_WEAVER_BEAN_NAME = "loadTimeWeaver";

	/**
	 * Name of the {@link Environment} bean in the factory.
	 * @since 3.1
	 */
	String ENVIRONMENT_BEAN_NAME = "environment";

	/**
	 * Name of the System properties bean in the factory.
	 * @see java.lang.System#getProperties()
	 */
	String SYSTEM_PROPERTIES_BEAN_NAME = "systemProperties";

	/**
	 * Name of the System environment bean in the factory.
	 * @see java.lang.System#getenv()
	 */
	String SYSTEM_ENVIRONMENT_BEAN_NAME = "systemEnvironment";

	/**
	 * Name of the {@link ApplicationStartup} bean in the factory.
	 * @since 5.3
	 */
	String APPLICATION_STARTUP_BEAN_NAME = "applicationStartup";

	/**
	 * {@link Thread#getName() Name} of the {@linkplain #registerShutdownHook()
	 * shutdown hook} thread: {@value}.
	 * @since 5.2
	 * @see #registerShutdownHook()
	 */
	String SHUTDOWN_HOOK_THREAD_NAME = "SpringContextShutdownHook";

2. 設定容器id

/**
	 * Set the unique id of this application context.
	 * 給應用背景關系-容器設定唯一的id
	 * @since 3.0
	 */
void setId(String id);

3. 設定父容器

/**
	 * Set the parent of this application context.
	 * <p>Note that the parent shouldn't be changed: It should only be set outside
	 * a constructor if it isn't available when an object of this class is created,
	 * for example in case of WebApplicationContext setup.
	 * 為該應用背景關系設定父級
	 * 請注意,不應更改父級:僅當在創建此類的物件時不可用
	 * (例如在WebApplicationContext安裝的情況下)時,才應在建構式外部設定父級,
	 * @param parent the parent context
	 * @see org.springframework.web.context.ConfigurableWebApplicationContext
	 */
	 void setParent(@Nullable ApplicationContext parent);

3. 設定環境變數

/**
	 * Set the {@code Environment} for this application context.
	 * 為該應用背景關系設定環境變數
	 * @param environment the new environment
	 * @since 3.1
	 */
	void setEnvironment(ConfigurableEnvironment environment);

4. 獲取環境變數配置資訊

/**
	 * Return the {@code Environment} for this application context in configurable
	 * form, allowing for further customization.
	 * 以可配置的形式回傳此應用程式背景關系的{@code Environment},以便進行進一步的自定義
	 * @since 3.1
	 */
	@Override
	ConfigurableEnvironment getEnvironment();

5. 設定應用啟動

/**
	 * Set the {@link ApplicationStartup} for this application context.
	 * <p>This allows the application context to record metrics
	 * during startup.
	 * 這允許在啟動期間應用程式背景關系記錄指標
	 * @param applicationStartup the new context event factory
	 * @since 5.3
	 */
	void setApplicationStartup(ApplicationStartup applicationStartup);

6. 添加后置處理器

不知道這個后置處理器的作用,在哪個后面進行使用呢?

/**
	 * Add a new BeanFactoryPostProcessor that will get applied to the internal
	 * bean factory of this application context on refresh, before any of the
	 * bean definitions get evaluated. To be invoked during context configuration.
	 * @param postProcessor the factory processor to register
	 */
	void addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor);

7. 應用監聽器

在IOC的很多地方都能見到堅挺器的身影,那監聽器到底起到什么作用呢?

/**
	 * Add a new ApplicationListener that will be notified on context events
	 * such as context refresh and context shutdown.
	 * <p>Note that any ApplicationListener registered here will be applied
	 * on refresh if the context is not active yet, or on the fly with the
	 * current event multicaster in case of a context that is already active.
	 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 * 中文解釋:
	 * 添加一個在應用監聽器,他將在應用事件被發現,列如應用事件:重繪和關閉應用背景關系
	 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 * @param listener the ApplicationListener to register
	 * @see org.springframework.context.event.ContextRefreshedEvent
	 * @see org.springframework.context.event.ContextClosedEvent
	 */
	void addApplicationListener(ApplicationListener<?> listener);

8. 設定ClassLoader

/**
	 * Specify the ClassLoader to load class path resources and bean classes with.
	 * <p>This context class loader will be passed to the internal bean factory.
	 * ~~~~~~~~~~~~~~~~~
	 * 指定ClassLoader以加載類路徑資源和Bean類,
	 * 該背景關系類加載器將傳遞給內部bean工廠
	 * ~~~~~~~~~~~~~~~~~
	 * @since 5.2.7
	 * @see org.springframework.core.io.DefaultResourceLoader#DefaultResourceLoader(ClassLoader)
	 * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setBeanClassLoader
	 */
	void setClassLoader(ClassLoader classLoader);

ClassLoader 在之前查看資源決議器中遇到過,在容器創建中少不了對組態檔的決議和類加載,這里提供了類加載設定介面,該檔案加載器還要被加載到內部bean工廠中使用,

9. 增加協議決議器

/**
	 * Register the given protocol resolver with this application context,
	 * allowing for additional resource protocols to be handled.
	 * <p>Any such resolver will be invoked ahead of this context's standard
	 * resolution rules. It may therefore also override any default rules.
	 * ~~~~~~~~~~~~~~~~~~~
	 * 想該應用背景關系注冊給定的協議決議器
	 * 允許處理其他協議資源
	 * 任何此類決議程式都將在此背景關系的標準決議規則之前呼叫,
	 * 因此,它也可以覆寫任何默認規則,
	 * ~~~~~~~~~~~~~~~~~~~
	 * @since 4.3
	 */
	void addProtocolResolver(ProtocolResolver resolver);

協議決議器我在資源決議中也看到可,除了默認的資源決議器之外,Spring還提供介面,允許用戶注冊增加其他資源決議器,大大增強了Spring框架的拓展性,
其實也就是,Spring將整體的流程定義好了,在整個流程的每個環節都為用戶提供了自定義點,增加靈活性,只要各個環節的資料結構規定好,在各個環節中,用戶可以自由發揮,這種設計理念值得借鑒,

10. 重繪容器

/**
	 * Load or refresh the persistent representation of the configuration, which
	 * might be from Java-based configuration, an XML file, a properties file, a
	 * relational database schema, or some other format.
	 * 加載或重繪配置的持久表示形式,
	 * 該表示形式可能來自基于Java的配置,XML檔案,屬性檔案,關系資料庫模式或其他某種格式,
	 * <p>As this is a startup method, it should destroy already created singletons
	 * if it fails, to avoid dangling resources. In other words, after invocation
	 * of this method, either all or no singletons at all should be instantiated.
	 * 因為這是一個啟動方法(在后面的創建容器方法,該方法當做容器創建方法),如果失敗了,它應該銷毀樣創
	 * 的單例,換句話說,在呼叫此方法之后,應實體化所有單例或根本不實體化,
	 * @throws BeansException if the bean factory could not be initialized
	 * @throws IllegalStateException if already initialized and multiple refresh
	 * attempts are not supported
	 */
	void refresh() throws BeansException, IllegalStateException;

11. 注冊關閉掛鉤

/**
	 * Register a shutdown hook with the JVM runtime, closing this context
	 * on JVM shutdown unless it has already been closed at that time.
	 * <p>This method can be called multiple times. Only one shutdown hook
	 * (at max) will be registered for each context instance.
	 * <p>As of Spring Framework 5.2, the {@linkplain Thread#getName() name} of
	 * the shutdown hook thread should be {@link #SHUTDOWN_HOOK_THREAD_NAME}.
	 * @see java.lang.Runtime#addShutdownHook
	 * @see #close()
	 */
	void registerShutdownHook();

12. 關閉應用背景關系

/**
	 * Close this application context, releasing all resources and locks that the
	 * implementation might hold. This includes destroying all cached singleton beans.
	 * <p>Note: Does <i>not</i> invoke {@code close} on a parent context;
	 * parent contexts have their own, independent lifecycle.
	 * 關閉此應用程式背景關系,釋放實作可能持有的所有資源和鎖, 
	 * 這包括銷毀所有快取的單例bean,
	 * 注意:不會在父背景關系上呼叫close ; 父級背景關系具有自己的獨立生命周期,
	 * <p>This method can be called multiple times without side effects: Subsequent
	 * {@code close} calls on an already closed context will be ignored.
	 * 這個方法可以多次呼叫此方法而沒有副作用:在已經關閉的背景關系上進行的后續close呼叫將被忽略,
	 */
	@Override
	void close();

13. 判斷應用上下是否關閉,是否處于活躍狀態

/**
	 * Determine whether this application context is active, that is,
	 * whether it has been refreshed at least once and has not been closed yet.
	 * 確定尬應用背景關系是否處于活動狀態,,即,是否至少重繪一次并且尚未關閉,
	 * @return whether the context is still active
	 * @see #refresh()
	 * @see #close()
	 * @see #getBeanFactory()
	 */
	boolean isActive();

14. 獲取內部bean工廠

/**
	 * Return the internal bean factory of this application context.
	 * Can be used to access specific functionality of the underlying factory.
	 * <p>Note: Do not use this to post-process the bean factory; singletons
	 * will already have been instantiated before. Use a BeanFactoryPostProcessor
	 * to intercept the BeanFactory setup process before beans get touched.
	 * <p>Generally, this internal factory will only be accessible while the context
	 * is active, that is, in-between {@link #refresh()} and {@link #close()}.
	 * The {@link #isActive()} flag can be used to check whether the context
	 * is in an appropriate state.
	 * ~~~~~~~~~~~~~~~~
	 * 回傳該應用背景關系的內部bean工廠
	 * ~~~~~~~~~~~~~~~~
	 * @return the underlying bean factory
	 * @throws IllegalStateException if the context does not hold an internal
	 * bean factory (usually if {@link #refresh()} hasn't been called yet or
	 * if {@link #close()} has already been called)
	 * @see #isActive()
	 * @see #refresh()
	 * @see #close()
	 * @see #addBeanFactoryPostProcessor
	 */
	ConfigurableListableBeanFactory getBeanFactory() throws IllegalStateException;

問題

1. 關于一開始對某些名稱的bean名進行大寫替換,為什么要這么做呢?

2. 為什么要給應用程式背景關系設定啟動程式?

3. 容器創建中,監聽器的作用是什么呢?

參考文章

  • 介紹依賴注入的發展流程

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

標籤:其他

上一篇:2021-02-03 Fabric Contributor Meeting 個人筆記 有關Fabric Gateway RFC的概要

下一篇:智慧工地_平安城市監控專案中應用國標GB28181流媒體服務

標籤雲
其他(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