我发送带有嵌入图像(作为附件)的HTML电子邮件,图像显示在GMail中.但是,它们也会在电子邮件下显示为附件.有谁知道如何避免这种情况,即我只想在电子邮件中使用它们而不是作为附件列出.我使用过"Content-Disposition:inline".我正在使用Spring和JavaMail.
这是我的邮件最终结果.谁能看到什么错了?
Delivered-To: ...
...
Subject: ...
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_1248835444.1288246311187"
------=_Part_0_1248835444.1288246311187
Content-Type: multipart/related;
boundary="----=_Part_1_592250078.1288246311197"
------=_Part_1_592250078.1288246311197
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<html>
<body>
<p><img src="cid:a0"/></p>
</body>
</html>
------=_Part_1_592250078.1288246311197
Content-Type: image/x-png
Content-Transfer-Encoding: base64
Content-Disposition: inline
Content-ID: <a0>
iVBORw0KGgoAAAANSUhEUgAAAPAAAABQCAYAAAAnSfh8AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
...
Qcz8hzyUxqGHjkNbsY4Df5iBg6OIwafQHBxFjP8PAIwl43uhncLdAAAAAElFTkSuQmCC
------=_Part_1_592250078.1288246311197--
------=_Part_0_1248835444.1288246311187--
Run Code Online (Sandbox Code Playgroud) 默认值为 2000 毫秒,这不足以让我的应用程序中的请求完全完成。
https://tomcat.apache.org/tomcat-8.5-doc/config/context.html
我有一个Grails应用程序,其中一些页面只能通过https访问,一些页面可通过http访问.使用之前的过滤器可以轻松处理.然而HTTPS页面上时,只要一个控制器并重定向用户返回HTTP的结束,并通过过滤器再次指向HTTPS.
def update = {
...
redirect(action: "show", id: domainInstance.id)
}
Run Code Online (Sandbox Code Playgroud)
在Firebug我得到:
POST ... localhost:8443 (the form submit to controller)
GET ... 302 ... localhost:8080 (the redirect to show in controller)
GET ... 301 ... localhost:8443 (the redirect back to https in filter)
Run Code Online (Sandbox Code Playgroud)
如何让控制器重定向呼叫"记住"当前协议等?或者我做错了什么?
我正在寻找Grails(GORM)实例的"isDeleted()"测试:
Project p = ... get persistent entity from somewhere ...
p.delete() // done in some nested logic
... sometime later in the code prior to commit of the tx ...
if (!p.isDeleted()) ... do some more stuff ...
Run Code Online (Sandbox Code Playgroud)
在我的应用程序中,可能删除p的逻辑在其他地方并且传回一个标志或某些东西会很痛苦.
我似乎无法在任何地方找到它,并假设这个jar是作为其他东西的一部分构建的.谁知道我可以在哪里获得来源?我使用的是1.0.2版.
我正在寻找一个解析器生成器,它接受 Javacc 语法文件 (.jj) 并用 Javascript(而不是 Java)生成解析器。这样的事情存在吗?或者,将 .jj 文件转换为 ANTLR(可以输出 Javascript)可以理解的文件有多困难?
我正在尝试通过慢速查询解决一些应用程序性能问题。我们正在使用 Postgresql 9.2。我可以很容易地看到正在进行的查询:
postgres=# select now() - query_start, query from pg_stat_activity where state <> 'idle';
00:00:01.535388 | select bla from product where ...
Run Code Online (Sandbox Code Playgroud)
我需要知道查询中列出的表所在的架构。鉴于在同一个数据库中的不同架构中有数百个表,我如何查看正在查询哪个“产品”表。
我们的Postgres 9.2.4服务器平均需要0.69秒(15000条语句)才能执行
SET CONSTRAINTS ALL DEFERRED
Run Code Online (Sandbox Code Playgroud)
为什么会这样?
会INITIALLY DEFERRED
在表定义中使用而不是使用SET CONSTRAINTS ..
消除此时间或仅将其隐藏在其他地方吗?
我通过使路径成为其父级中的最后一个子级来响应 SVG 路径元素上的 mouseenter 事件。这就是它出现在其他元素之上的原因(不幸的是,SVG 内容上没有 z-index)。问题是在 Firefox 上这会导致 mouseleave 事件触发。这在 Chrome 上运行良好。
// on mousenter
node.parentNode.appendChild(node)
// this triggers a mouseleave .. if i don't move the node it works
Run Code Online (Sandbox Code Playgroud)
有谁知道解决方法或其他方法?
我有一个启用了波纹的 v-btn。有没有办法以编程方式触发涟漪效应?如果我在自己的另一个包裹按钮的组件上使用 v-ripple 指令,这可能吗?
我需要以一种不引人注目的方式将用户的注意力吸引到按钮上。
java ×6
grails ×3
javascript ×3
spring ×3
postgresql ×2
antlr ×1
d3.js ×1
gmail ×1
grails-orm ×1
hibernate ×1
html-email ×1
javacc ×1
mime-message ×1
parsing ×1
spring-boot ×1
svg ×1
tomcat ×1
vuetify.js ×1