用户登录
用户注册

分享至

JavaEE 中的“方面"是什么?

  • 作者: 求皮鞭就蜡烛
  • 来源: 51数据库
  • 2023-01-14

问题描述

我不仅想知道什么是 Facet,还想知道什么是物理层面"的 Facet(据我所知,它不是一个单独的罐子,但什么?)?

I wonder not only what is Facet but also what is Facet 'in physical level' (as I understand it's not a separate jar, but what?)?

我也想知道它在部署后如何影响我的应用程序.我会用真实的例子来解释:

I also wonder how can it affect my application after deploying. I'll explain on real example:

我有 2 个方面(由 IDE 创建):Spring Facet 和 Web Facet(用于 jsf).我将它部署到 Tomcat 并且我的应用程序运行良好.

I had 2 facets (which were created by IDE): Spring Facet and Web Facet (for jsf). I deployed it to Tomcat and my application worked fine.

然后我(通过 IDE)添加了另一个方面 - JPA 方面.我重新部署了应用程序,它仍然工作正常:)

Then I added (by means of IDE) one more facet - JPA Facet. I redeployed application and.. it still worked fine :)

所以,我只是好奇那是什么以及我们为什么需要它?

So, I'm just curious what is that and why do we need it?

推荐答案

这与 Java EE 无关.这是 IDE 相关的.该术语本身与编程无关.

This is not Java EE related. This is IDE related. The term is at its own not programming related.

来自 http://www.thefreedictionary.com/facet

fac·et (fst) n.

  1. 在宝石上切割或出现的平坦抛光表面之一自然地在水晶上.
  2. 解剖学一个小的、光滑的、平坦的表面,就像在骨头或牙齿上一样.
  3. 生物学 复眼的透镜状视觉单位之一,如昆虫.
  4. 作为一个主题的众多方面之一.请参阅 phase 上的同义词.
  1. One of the flat polished surfaces cut on a gemstone or occurring naturally on a crystal.
  2. Anatomy A small, smooth, flat surface, as on a bone or tooth.
  3. Biology One of the lenslike visual units of a compound eye, as of an insect.
  4. One of numerous aspects, as of a subject. See Synonyms at phase.

现在是 4.

在这种特定情况下,它只是项目中要使用的一个方面,以便 IDE 可以在其上拦截有关生成器、向导、自动包含库等的内容.如果您添加例如 JPA 方面,那么您将获得更多选择JPA 的 IDE 魔法.

In this specific case it's just an aspect which is to be used in the project, so that the IDE can intercept on it with regard to generators, wizards, auto-include libraries and so on. If you add for example the JPA facet, then you will get more options to do the IDE-magic with JPA.

软件
前端设计
程序设计
Java相关