如何在spring框架和EJB3之间做出选择[重复](how to make choice between spring framework and EJB3 [duplicate])

可能重复:
JEE6 vs. Spring 3堆栈

让我来开发一个基于事务的关键任务应用程序。 我会用Java做的。 现在我必须选择这项技术。 我的应用程序必须可扩展,性能良好,代码必须可维护,我希望获得长期投资回报率。 首先,我要选择框架。 作为一个框架,春天在我的脑海中首先出现。 但我知道有更多像EJB3或其他东西。 现在我的问题是,我应该选择什么,带有JPA的EJB3或带有Hibernate的spring框架。 我知道每种技术都有权衡。 任何人都可以帮我做出好的选择吗? 有一点要说清楚,我还是学习者。我想知道EJB和spring框架的优缺点。 谢谢


Possible Duplicate:
JEE6 vs. Spring 3 stack

Let I’m going to develop a mission critical application which will be massively transaction based. I will do it with Java. Now I have to choose the technology. My application must be scalable, good performing, code must be maintainable and I want to get long term ROI. First thing, I’m going to choose framework. As a framework, spring comes at first in my mind. But I know there are more like EJB3 or anything. Now my question, what should I choice, EJB3 with JPA or spring framework with Hibernate. I know every technology have tradeoffs. Can anyone help me to make good choice? And one thing to make clear, I’m still learner.And I want to know advantage and disadvantage of EJB and spring framework too. Thanks


原文:https://stackoverflow.com/questions/7051686
2022-03-07 08:03

满意答案

我不确定你想要什么,但请告诉我这是否适合你:

  • 仅使用a而不是两个标签(我知道你正在使用)

Snipet

a {
  padding: 10px;
  border: 2px solid #e4910c;
  border-radius: 200px;
  transition: background-color 0.1s;
  display:inline-block; /* demo purposes - optional */
  color:#e4910c;
  text-decoration:none;
    
}
a:hover {
  background-color: #e4910c;
  color: white;
}
<a href="#">Text link</a>


I'm not quiet sure about what you want, but let me know if this will suit you:

  • using only a instead of two tags (which I understand you are using)

Snipet

a {
  padding: 10px;
  border: 2px solid #e4910c;
  border-radius: 200px;
  transition: background-color 0.1s;
  display:inline-block; /* demo purposes - optional */
  color:#e4910c;
  text-decoration:none;
    
}
a:hover {
  background-color: #e4910c;
  color: white;
}
<a href="#">Text link</a>

相关问答

更多

如何在CSS中设置文本的背景颜色?(How do I set the background color of targeted text only, using only CSS?)

将文本放在内联元素中 ,例如<span> 。 <h1><span>The Last Will and Testament of Eric Jones</span></h1> 然后在内联元素上应用背景颜色。 h1 { text-align: center; } h1 span { background-color: green; } 内联元素与其内容一样大,所以应该为您做。 Put the text in an inline element, such as a <span...

如何在jquery中设置背景颜色(How to set background color in jquery)

$(this).css('background-color', 'red'); $(this).css('background-color', 'red');

(JavaFX 8)css按钮边框和背景颜色问题((JavaFX 8) css button border and background color issue)

为了重现这个问题,你需要更多场景中的一个Button节点。 当按钮不聚焦时,视觉效果是由于背景插入引起的。 为了避免这种情况,添加-fx-background-insets: 0; 在.button:hover CSS规则上,问题将得到解决。 .button:hover { -fx-background-color:lime; -fx-background-radius:0; -fx-border-color:black; -fx-border-width: 0 3...

CSS边框颜色:如何设置底部边框颜色?(CSS Border Color: How to set bottom border color?)

您必须将border-style设置为solid以使其可以正常工作。 您在底部看到的灰色边框是由于默认的UA样式,我是border-style: outset 。 正如MarcosPérezGude在他的评论中所指出的那样,按钮的默认border-style是初始的,对于input和textarea元素是inset 。 .zoom { border-width: 2px 0px 2px 0px; background: white; border-color: white; ...

获取元素的背景颜色并将其设置为其他元素的边框颜色(Get background color of element and set it as border-color of other element)

考虑以下代码: $(document).ready(function() { var primarycolor = $(".primary").css("background-color");//getting color after document loaded $(".btn-breadcrumb .btn:not(:last-child):after").css("border-left", "10px solid " + primarycolor + "!importan...

可以将背景颜色应用于未应用于边框的元素吗?(Possible to apply a background color to element that does not get applied to border? (CSS))

是 使用background-clip - MDN Link background-clip CSS属性指定元素的背景(颜色或图像)是否在其边框下方延伸。 边界框 背景延伸到边界的外边缘(但在z排序的边框下面)。 填充盒 边框下方没有绘制背景(背景延伸到填充的外边缘)。 内容箱 背景被绘制在(剪切到)内容框中。 p { border: 10px navy; border-style: dotted double; margin: 1em; padding: 1em; ...

在IE中,fieldset的背景颜色超出边框(The fieldset’s background color gets out of border in IE)

这是一个众所周知的IE错误,无论您是使用JavaScript生成元素还是自己编写HTML,都会发生这种错误。 legend是fieldset的子项,但由于它位于fieldset顶部边缘的“上方”,IE(错误地)扩展了fieldset的背景颜色以包含legend 。 一个简单的解决方法是绝对定位legend ,使其脱离正常的元素流,并手动调整其位置,使其大致位于正常位置。 同时相对定位fieldset使legend保持在其附近。 像这样的东西(根据需要调整值): fieldset { pos...

使用CSS设置工具提示箭头的边框颜色(Set Border Color of Tooltip Arrow with CSS)

我之前也曾努力画三角形。 几乎可以在这里和这里处理HTML中的三角形的技巧处理边框。 因此,使用这种技巧绘制三角形边框是不可能的。 一种选择是旋转正方形并隐藏一半。 这种方法的优点是绘制边框很容易,但我没有找到超级干净的方法来隐藏一半的方块。 因此,当工具提示或三角形的不透明度小于1时,这不是理想的方法。 也许这就是你想要的。 Jsfiddle.net演示就在这里 。 .hint { position: relative; display: inline-block; margi...

在css中设置背景图像和颜色(Set background image and color in css)

添加z-index:-1; 到你的伪元素#canvas-preview::before使文本可见 因为它将#canvas-preview作为一个图层来实现,并且在你的bg-image无法加载的情况下作为后备 。 因此,为了使文本层可见,您需要降低伪元素的z-index 。 更新了代码段 #canvas-preview { width: 200px; border: 1px solid #000000; box-sizing: border-box; position: re...

如何在CSS中设置边框中的背景颜色(How to set background color in border in CSS)

我不确定你想要什么,但请告诉我这是否适合你: 仅使用a而不是两个标签(我知道你正在使用) Snipet a { padding: 10px; border: 2px solid #e4910c; border-radius: 200px; transition: background-color 0.1s; display:inline-block; /* demo purposes - optional */ color:#e4910c; text-de...

相关文章

更多

精通EJB3.0

《精通EJB3.0》是关于EJB 3.0的专业技术教程,专注于EJB的概念、方法、开发过程的介绍。同时 ...

IOS-Social.framework

1.使用前 需要导入Social.framework 框架 2.实例代码(新浪微博为例) - (IBA ...

AMF: ASP.NET Mobile Framework

ASP.NET移动框架(AMF)是一种最常用的平板电脑和智能手机上Web应用程序的框架,基于jQuer ...

【z】Storm - the world's best IDE framework for .NET

http://www.codeproject.com/Articles/42799/Storm-the ...

EJB3.0 视频教程-尚学堂视频教程

EJB是sun的服务器端组件模型,设计目标与核心应用是部署分布式应用程序。 凭借java跨平台的优势, ...

安卓应用程序插件化开发框架 -AAP Framework

上篇博文,介绍了一种安卓开发中程序插件化的方法,想想应该可以搞的更方便些,于是花了4天时间把框架做出来 ...

安卓应用程序插件化开发框架 -AAP Framework

介绍 这个框架的初衷,是为了方便让程序模块化、插件化,将一个apk应用拆分为多个apk。 不 ...

spring quartz定时任务

本人有一个应用,需要 每15分钟 执行一次入库操作(比较费时),使用spring 架构。现在想使用qu ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本