Context context Spring in what refers to

Context (background / context) context
is the environment the currently running programs.
Various online can not say vague, but certainly put forward a concept of original meaning.

Summary context can be understood as:

  1. Context refers to the environment by the program code is run, it does not refer to the code.
  2. A set of states, this is easy to understand examples spring to take the official document of the cloud:

A Spring Cloud application by creating a "bootstrap" operation context, the context is the main application of the parent context.
Guiding the context in the main application context different external configuration convention, so use bootstrap.yml application.yml (or .properties) instead of the guide and the external configuration of the master context.
Here, the term context is a set of guiding state, save the configuration is actually a large object, another point is the environment management.

  1. Environmental background
    of each period of the program has a lot of external variables. Add only like this simple function is not external variables. Once you have a program of external variables, this process is not complete, it can not operate independently. In order to make you run them, one by one, you should write some value to all external variables into account. The set of these values is called a context.

Checked context

n.        语境; 上下文; 背景; 环境;

Translation context who use, obviously with the background, the environment is more appropriate,

Taken know almost

And other parameters of the incoming object is no different.
Context is generally used to describe a few characteristics:
be passed Context parts (components), internal need frequent access to data and calls the function Context.
There is a strong dependence on the context, to achieve based on the context.
Context will be more most parts (components) of the desired, be implemented in the software part Context occur at a single instance of SCENE, then call a plurality of portions (components) instance object.
Local globalized appear.
Context will hold a lot of state data.
Coder habit of naming a product of choice glued difficult.

https://www.zhihu.com/question/26387327

Reproduced in: https: //www.jianshu.com/p/cc2910c37777

Guess you like

Origin blog.csdn.net/weixin_34387284/article/details/91221349