Spring Boot 1.4 VelocityEngineUtils已弃用(Spring Boot 1.4 VelocityEngineUtils deprecated)
我刚刚更新到spring boot 1.4并注意到VelocityEngineUtils已被弃用。 我正在使用Velocity模板发送与spring框架示例相同的电子邮件
发送除Velocity模板以外的电子邮件模板的替代方法是什么
i just updated to spring boot 1.4 and noticed that VelocityEngineUtils is deprecated. I am using Velocity Templates to send emails same as in spring framework example
What are the alternative for sending emails templates other than Velocity template
原文:https://stackoverflow.com/questions/38651915
最满意答案
您的代码构造方式只会在页面加载时运行一次 - 在这种情况下,select的值将始终为空字符串。 如果您希望它响应更改:
$("#analyses").bind("change",function(){ if (document.getElementById("analyses").value == 'distance'){ loadScript('/static/distance.js', function() { console.log('done loading'); }); }else{ loadScript('/static/geoClusters.js', function() { console.log('done loading'); }); } });
The way your code is structured it will only run once on page load - in which case the value of the select will always be an empty string. If you want it to respond to changes:
$("#analyses").bind("change",function(){ if (document.getElementById("analyses").value == 'distance'){ loadScript('/static/distance.js', function() { console.log('done loading'); }); }else{ loadScript('/static/geoClusters.js', function() { console.log('done loading'); }); } });
相关问答
更多-
return语句结束一个函数,你不能在它后面执行代码。 你可以这样做: ret = "You are logged out."; Logout(); return ret; The return statement ends a function, you cannot execute code after it. You could do this: ret = "You are logged out."; Logout(); return ret;
-
我们来分析你的代码: if(i % size === 0) 这意味着,当i等于0或是大小的倍数时。 在你的情况下,大小是8。 所以对于你的触发器,我应该是0,8,16,32 .... 在所有这些情况下,它永远不会触发,因为当我是0,8,16,32 ... i%2是0时,所以它将运行第一个if而不是第二个。 您应该反转ifs的顺序或运行两者 Let´s analyse your code: if(i % size === 0) This means, when i is equal to 0 or i ...
-
没有if语句的分支(Branching without if statement)[2022-03-23]
是的,你可以,GPU风格。 假设您有一个分支的函数,并在最后返回一个值。 float function( float input ) { if( input > 0 ) { // do stuff finalValue = 2+4+8*input; return finalValue ; } else { // do other stuff finalValue = 1+input; ... -
您的代码构造方式只会在页面加载时运行一次 - 在这种情况下,select的值将始终为空字符串。 如果您希望它响应更改: $("#analyses").bind("change",function(){ if (document.getElementById("analyses").value == 'distance'){ loadScript('/static/distance.js', function() { console.log(' ...
-
javascript:if语句(javascript:if statement)[2023-06-17]
听起来您正在寻找逻辑异或(XOR)操作。 这里有一些Javascript示例。 我最喜欢的(出乎意料和简单)是: if (foo ? !bar : bar) { ... } 不可否认,这是一个不寻常的编码,并且接近“过于聪明”。 有时,如果一种语言没有操作的直接语法,则代码必须是冗长的,比如从除法运算中获取商和余数。 It sounds like you are looking for a logical exclusive-or (XOR) operation. There are some J ... -
你可能希望它更像是: var uname = document.getElementById("pword1").value; var pword = document.getElementById("cPassword").value; var passReq = "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\\\+\=\"\.\[\]_£|`¬':;~{}<>()#?!@$%^&*-]).{8,20}$"; var pwReqExp ...
-
为什么这个if / else语句总是执行if分支?(Why does this if/else statement always execute the if branch?)[2022-04-22]
您不应该在click函数中重新定义resizeValue变量。 只需从var resizeValue删除var (它只应在var resizeValue的顶部使用)。 You shouldn't redefine the resizeValue variable within the click function. Just remove var from var resizeValue (it should only be used at the top of the ready-function). -
尝试这个: var myApp = angular.module('myApp',[]); function MyCtrl($scope) { var items = [ { "Item 1": "sub 30" }, { "Item 2": "sub 53" }, { "Item 7": "sub 21", ...
-
立即执行语句(Execute immediate statement)[2023-07-18]
create table table1(tem varchar2(50), tablename varchar2(50)); create table tabl2(tabl_name varchar2(50)); insert into table1(tem, tablename) values ('table1','table1'); begin for rc in (select tablename from table1) loop --dbms_output.put_line('i ... -
我怎样才能执行一个语句后,循环完成在JavaScript?(How can I execute a statement AFTER a loop finishes in javascript?)[2021-11-10]
请参见async.whilst 。 你需要for循环的流控制,为此它提供了一个回调来控制每个循环迭代。 var temphtml = "", j = 0; async.whilst( function() { return j < 3 }, function(callback) { db.austinsroom.find({"y": j }, {}).sort({"x": 1}, function(err, records) temphtml += records.m ...