Deployment Description简介

转自:https://blog.csdn.net/K_irving_whj/article/details/88633272

1、Deployment Descriptor部署描述符:

  • 部署描述符是要部署到Web容器或EJB容器的Web应用程序或EJB应用程序的配置文件。

  • 部署描述符应包含EJB应用程序中所有企业bean的标准结构信息。

  • 文件名是ejb-jar.xml,EJB的描述符通知EJB服务器有关构成bean实现的类,主接口和远程接口。

  • 标准部署描述符应包含每个企业bean的结构信息。

2、什么是部署描述符?

  • Deployment Descriptor是一个扩展名为.xml的XML文档。

  • 它基本上描述了应用程序或模块或组件的部署设置。

  • 在运行时,J2EE服务器读取部署描述符并理解它,然后根据描述符中提到的信息对组件或模块进行操作。

  • 例如,EJB模块有一个部署描述符ejb-jar.xml,我们在其中提到它是会话或实体还是消息驱动的bean以及Bean类所在的位置以及什么类型的事务等等。

  • 简而言之,没有部署描述符Container(EJB / Servlet / JSP容器)不知道如何处理该模块。

  • 部署描述符是定义以下类型信息的文件:

  • EJB结构信息,例如EJB名称,类,home和远程接口,bean类型(会话或实体),环境条目,资源工厂引用,EJB引用,安全角色引用,以及基于bean类型的其他信息。

  • 应用程序程序集信息,例如EJB引用,安全角色,安全角色引用,方法权限和容器事务属性。

  • 指定程序集描述符信息是应用程序组装器执行的可选任务。
    3、 web.xml文件详解:

WEB工程加载web.xml过程

经过个人测试,WEB工程加载顺序与元素节点在文件中的配置顺序无关。即不会因为 filter 写在 listener 的前面而会先加载 filter。WEB容器的加载顺序是:ServletContext -> context-param -> listener -> filter -> servlet。并且这些元素可以配置在文件中的任意位置。

加载过程顺序如下:

启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取和两个结点。
紧急着,容创建一个ServletContext(servlet上下文),这个web项目的所有部分都将共享这个上下文。
容器将转换为键值对,并交给servletContext。
容器创建中的类实例,创建监听器。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
A Deployment in Kubernetes is an object that manages a set of identical pods. It provides a way to declaratively manage the creation, scaling, and updating of pods in a Kubernetes cluster. The `kubectl explain deployment` command provides a detailed description of the Deployment resource, including its fields and their meanings. Here is an example output of the command: ``` KIND: Deployment VERSION: apps/v1 DESCRIPTION: Deployment enables declarative updates for Pods and ReplicaSets. FIELDS: apiVersion <string> APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources kind <string> Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds metadata <Object> Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata spec <Object> Specification of the desired behavior of the Deployment. status <Object> Most recently observed status of the Deployment. ``` The output provides a summary of what a Deployment is, its API version, kind, and the three main fields: metadata, spec, and status. Each field is further described with its own set of subfields and their meanings.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值