首页 \ 问答 \ WEB-INF和/ src / main / resources文件夹有什么区别?(What is the difference between WEB-INF and /src/main/resources folders?)

WEB-INF和/ src / main / resources文件夹有什么区别?(What is the difference between WEB-INF and /src/main/resources folders?)

在使用hibernate的Spring 3应用程序中,哪些文件“特定”需要在WEB-INF中? 我也在使用Maven。

在应用程序在生产环境中运行之前,是否需要将/ src / main / resources中的某些文件复制到WEB-INF?

谢谢!


Which files "specifically" need to be in WEB-INF in a Spring 3 application which uses hibernate? I am also using Maven.

Do certain files in /src/main/resources need to be copied to WEB-INF before the app is run in a production environment?

Thanks!


原文:https://stackoverflow.com/questions/11254514
更新时间:2022-04-26 07:04

最满意答案

每次输入span ,都会绑定该跨度的mouseleave处理程序。 因此,如果您多次输入跨度,当您离开它时,您将多次运行mouseleave处理程序。 其中每个都将调用setTimeout() ,但f将仅设置为最后一个。 因此,当您稍后执行clearTimeout(f) ,它只会清除其中一个,其他的继续运行。

将一个事件处理程序绑定到另一个事件处理程序中几乎是不对的。 事件处理程序通常应在顶层定义。 如果您希望一个处理程序依赖于某个其他处理程序是否先运行,请使用变量来跟踪它。


Every time you enter a span, you bind a mouseleave handler for that span. So if you enter a span multiple times, when you leave it you'll run the mouseleave handler multiple times. Each of these will call setTimeout(), but f will only be set to the last one. So when you later do clearTimeout(f), it only clears one of them, the others continue to run.

It's almost never right to bind one event handler inside another event handler. Event handlers should usually be defined at the top level. If you want one handler to be dependent on whether some other handler has run first, use a variable to keep track of it.

相关问答

更多
  • 如果使用CSS给出hover效果,那么是的,我通常会使用两个选项来获得: 一,当鼠标离开hover area时see hover effect : 在停靠的窗口中打开检查器,并增加宽度,直到到达您的HTML element ,然后右键单击,弹出菜单必须在检查器区域上方,然后当您将鼠标移动到检查器视图上时, hover effect将在文件。 二,为了keep hover effect即使鼠标未超过HTML element ,请打开检查器,转到Styles TAB ,然后单击右上角的图标,说明Toggle E ...
  • 这只是写@古法的答案的另一种方式: $(document).ready(function() { $('.progetto').hover(function() { //target only the desired elements by using $(this).find() $(this).find('.container-meta').css('right', '0'); $(this).find('.titolo-progetto').cs ...
  • 由于您的菜单位于另一个z-index上,是否可以使用visibility ? 这是一个DEMO 你需要改变这两件事 header nav > ul > li > ul { /*display:block;*/ visibility:hidden; } header nav > ul > li.drop:hover > ul { /*display:block;*/ visibility:visible; } 至于为什么IE10搞砸了display:block; 在这种情况 ...
  • 非常简单: $("selector").click(function() { $(this).hide(); }); 上面的"selector"将是任何有效的jQuery选择器 (例如".click-to-hide"使所有具有click-to-hide类的元素都具有此行为)。 隐藏元素是使用jQuery hide方法完成的(如果您希望稍后再次使元素可见,也会show该hide方法)。 如果您第一次隐藏元素后,您不打算对元素进行任何操作,您可能还需要考虑remove而不是hide 。 更新:要在第二次点击时 ...
  • 您可以使用转换而不是关键帧,因为您只有一个简单的动画。 .item { position: relative; height: 200px; width: 300px; border: 2px solid #000; text-align: center; line-height: 200px; color: #000; font-family: 'Arial'; margin: 25px 0px 0px 25px; font-size: 25px ...
  • 好的,我终于有了解决方案,但同时我知道这不是最好的解决方案。 - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { CGRect newFrame = [self.view.superview convertRect:self.searchDisplayController.searchRes ...
  • 如果将mouseleave事件绑定到#dropdown元素,则下拉列表将保留,直到用户将鼠标#dropdown到下拉列表: //Note: no need for the `li` here as there will only be 1 element with this id on the document $('#menu-item-20').bind('mouseenter', function () { $("#dropdown").stop(true, true).fadeIn(500) ...
  • 基于添加睡眠按预期工作的事实,听起来好像您的代码超越了WebDriver。 您需要执行某种同步以使它们彼此串联。 我会像这样利用陈旧性检查: WebDriverWait wait = new WebDriverWait(driver, 60); // 60 is the time to wait, can be extended as needed. This is an 'up-to' wait and will not necessarily stop for 60 seconds. var n ...
  • 每次输入span ,都会绑定该跨度的mouseleave处理程序。 因此,如果您多次输入跨度,当您离开它时,您将多次运行mouseleave处理程序。 其中每个都将调用setTimeout() ,但f将仅设置为最后一个。 因此,当您稍后执行clearTimeout(f) ,它只会清除其中一个,其他的继续运行。 将一个事件处理程序绑定到另一个事件处理程序中几乎是不对的。 事件处理程序通常应在顶层定义。 如果您希望一个处理程序依赖于某个其他处理程序是否先运行,请使用变量来跟踪它。 Every time you ...
  • 问题是你的move_right函数会拾取播放器并将它们完全移出地图。 假设您的播放器位于[0, 2]并逐步执行代码。 for (int j = 0; j < 5; j++) { if (map[i][j] == player_loc) { map[i][j+1] = player_loc; map[i][j] = '.'; } } [0, 0]这里没有球员,继续前进 [0, 1]这里没有球员,继续前进 [0, 2]找到一名球员! 将它们向右移动到[0, 3] ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)