I have a couple of SYSOUTs in my controller's methods, and they appear in the console log... verifying for me that all of the @RequestMapping is behaving as expected. The @Autowiring of an environment bean is also working (is also correctly displayed by a SYSOUT). However, the methods' returns (I am using methods that return String type) are only resulting in 404s. The *.jsps aren'
我在控制器的方法中有几个SYSOUT,并且它们出现在控制台日志中...为我验证所有@RequestMapping的行为如预期。 环境bean的@Autowiring也在工作(也可以通过SYSOUT正确显示)。 但是,方法的返回值(我使用的是返回String类型的方法)只会导致404s。 未找到* .jsps。 项目正在使用Maven; IDE是eclipse kepler,FWIW。 我的ViewResolver是沼气标准。 看不到断开连接。 我的web.xml: <?xml version="1.0"
I have a j2ee application developed using spring framework and spring webflow. Currently all of my url requests go through the Web Flow. What I want is to be able to choose whether to direct it to Web Flow or an ordinary spring mvc controller. I have no idea how to direct it to custom controllers. How do I do this? I tried having this in my web.xml but i can't direct it to the bean cont
我有一个使用spring框架和spring webflow开发的j2ee应用程序。 目前,我的所有网址请求均通过Web Flow。 我想要的是能够选择是将其引导至Web Flow还是普通的弹簧mvc控制器。 我不知道如何将它引导到自定义控制器。 我该怎么做呢? 我试着在我的web.xml中有这个,但我不能将它指向mytest2-servlet.xml中指定的bean控制器 <servlet> <servlet-name>mytest</servlet-name> <servlet-class>or
I am using generatePresignedUrl method of AmazonS3Client class to get a pre-signed URL. However when the method is called in the same session as that of the upload of the file. it returns url of the form : https://mp-dev.downloads.XYZ.com.s3.ap-south-1.amazonaws.com/certificate/404/17_04_2017/XYZ/ITHLUaXYPnMmHEUbK9L21KBneJQy7oJ1jw.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20170417T0
我正在使用AmazonS3Client类的generatePresignedUrl方法来获取预先签名的URL。 但是,当该方法在与文件上载相同的会话中调用时。 它返回表单的url: https://mp-dev.downloads.XYZ.com.s3.ap-south-1.amazonaws.com/certificate/404/17_04_2017/XYZ/ITHLUaXYPnMmHEUbK9L21KBneJQy7oJ1jw.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X- AMZ-日期= 20170417T090656Z&X-AMZ-SignedHeaders =宿主&X-AMZ-过期= 900&X-AMZ-凭证=
I'm trying to get orders with Amazon MWS, but ran into some problems. Yes, I have tested this with their MSW scratchpad, and got results. But now I tried to enter their "String to sign" in my browser get this: Parameter Signature cannot be empty. So I go and use Amazons code to calculate a signature and generete my own "String to sign" and this is what I get, my cred
我试图与亚马逊MWS订购,但遇到了一些问题。 是的,我已经用他们的MSW暂存器测试过了,并得到了结果。 但是现在我试图在我的浏览器中输入他们的“字符串来签名”得到这个: 参数签名不能为空。 所以我去使用Amazons代码来计算签名,并生成我自己的“签名字符串”,这就是我所得到的,我的凭据都很好,从scratchpad复制。 如果它在那里工作,它必须在这里工作? 不。 我只改变了这段代码: parameters.put("Action", urlEnc
I am using below mentioned code to send Email. public static void send(String email, String subject, String body) { try { fromEmail = "abc.@xyz.com"; Content subjectContent = new Content(subject); Destination destination = new Destination().withToAddresses(new String[] { "cde@gmail.com" }); Content htmlContent = new Content().withData("<h1>Hello - I ho
我正在使用下面提到的代码发送电子邮件。 public static void send(String email, String subject, String body) { try { fromEmail = "abc.@xyz.com"; Content subjectContent = new Content(subject); Destination destination = new Destination().withToAddresses(new String[] { "cde@gmail.com" }); Content htmlContent = new Content().withData("<h1>Hello - I hope you'r
I have been playing with Amazon's Product Advertising API, and I cannot get a request to go through and give me data. I have been working off of this: http://docs.amazonwebservices.com/AWSECommerceService/2011-08-01/GSG/ and this: Amazon Product Advertising API signed request with Java Here is my code.. I generated the SOAP bindings using this: http://docs.amazonwebservices.com/AWSECommerc
我一直在玩亚马逊的产品广告API,我无法获得通过并提供数据的请求。 我一直在努力:http://docs.amazonwebservices.com/AWSECommerceService/2011-08-01/GSG/以及:亚马逊产品广告API对Java签名的请求 这是我的代码..我使用这个生成SOAP绑定:http://docs.amazonwebservices.com/AWSECommerceService/2011-08-01/GSG/YourDevelopmentEnvironment.html#Java 在Classpath中,我只有:commons-codec.1.5.jar import com.ECS.cl
My app will access a webservice to access data (even if the application is not in foreground), every 10 minutes. What is the best way to do that? First do I need to start my service in seaparate thread? And how to make it get update from server every 10 minutes? Some people said handler.postdelayed and some using Alarm Manager. which one is better and do we have some examples. If the upda
我的应用程序将每10分钟访问一次web服务以访问数据(即使应用程序不在前台)。 什么是最好的方式来做到这一点? 首先,我需要在海洋线程中启动我的服务吗? 并且如何使它每10分钟从服务器获取更新? 有些人说handler.postdelayed和一些使用Alarm Manager。 哪一个更好,我们是否有一些例子。 如果更新将在您的应用程序运行时发生,您可以使用Timer,如其他答案中所建议的,或者更新的ScheduledThreadPoolExecutor 。
How do I get a method's execution time? Is there a Timer utility class for things like timing how long a task takes, etc? Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want. 总有一种老式的方式: long startTime = System.nanoTime(); methodToTime(); long endTime = System.nanoTime(); long duration = (endTime - startTime); //div
我如何获得方法的执行时间? 是否有定时器实用程序类,用于计时任务需要多长时间等等? Google上的大多数搜索都会返回定时器的结果,以计划线程和任务,这不是我想要的。 总有一种老式的方式: long startTime = System.nanoTime(); methodToTime(); long endTime = System.nanoTime(); long duration = (endTime - startTime); //divide by 1000000 to get milliseconds. 我用简单的答案去。 适用于我。 long startTime
I need my web application to send thousands of per day. Currently, on being triggered by front-end user, i run a for loop in back-end which send mails. Read this: How can I send an email by Java application using GMail, Yahoo, or Hotmail? Issues: If someone closes the web page after sending request, request is incomplete . It takes long time to send email and user has to wait. Ideally,
我需要我的Web应用程序每天发送数千封。 目前,在被前端用户触发后,我在发送邮件的后端运行一个for循环。 阅读本文:如何通过Java应用程序使用GMail,Yahoo或Hotmail发送电子邮件? 问题: 如果有人在发送请求后关闭网页,则请求不完整 。 发送电子邮件需要很长时间 ,用户必须等待。 理想情况下,我希望将电子邮件和内容保存在数据库中,以便调度程序从中选择作业并发送电子邮件,并在发送邮件/发生任何问题时通知
In my web-application I have a scoped session bean that is used among other things to keep some credential information required to connect to underlying systems (store a SAML that need to be sent for underlying web-services access). And I have that bean that does inject the credential at the right place right before the call to the web-serivce. @Autowired private MyScopedSession myScopedSessio
在我的Web应用程序中,我有一个有作用域的会话Bean,用于保存连接到底层系统(存储需要发送的底层Web服务访问的SAML)所需的某些凭据信息。 我有这个bean,在调用web-serivce之前,在正确的地方注入证书。 @Autowired private MyScopedSession myScopedSession; @Autowired private SomeWebService someWebService; public void someCall() { ... injectSamlPart ... } 我想添加后台任务(一个战争打包web应用+一些后