通过namecheap设置URL(Setting up URL through namecheap)
我想让我的域名( http://musicmartian.com )路由到104.131.30.223并且目前没有特别成功。
i am trying to have my domain (http://musicmartian.com) route to 104.131.30.223 and currently not being particularly successful.
原文:https://stackoverflow.com/questions/35491383
更新时间:2024-04-06 18:04
最满意答案
如果删除
enctype="multipart/form-data"
Spring注释将正常工作。@RequestParam(value="txtEmail", required=false)
你甚至可以从
request
对象获取参数。request.getParameter(paramName);
如果您想要接收
enctype="multipart/form-data"
配置多部分解析器。<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize" value="250000"/> </bean>
参考Spring文档 。
Spring annotations will work fine if you remove
enctype="multipart/form-data"
.@RequestParam(value="txtEmail", required=false)
You can even get the parameters from the
request
object .request.getParameter(paramName);
Use a form in case the number of attributes are large. It will be convenient. Tutorial to get you started.
Configure the Multi-part resolver if you want to receive
enctype="multipart/form-data"
.<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize" value="250000"/> </bean>
Refer the Spring documentation.
相关问答
更多-
如果删除enctype="multipart/form-data" Spring注释将正常工作。 @RequestParam(value="txtEmail", required=false) 你甚至可以从request对象获取参数。 request.getParameter(paramName); 如果属性数量很大,请使用表单 。 这将很方便。 教程 ,让你开始。 如果您想要接收enctype="multipart/form-data"配置多部分解析器。最后我想出了问题......我必须设置messageSource.setUseCodeAsDefaultMessage(false); 然后所有消息参数替换为正确的值! finally i figured out the problem ... i have to set messageSource.setUseCodeAsDefaultMessage(false); and then all message params replaced with the correct value !可以做什么来返回ModelAndView? 您可以像往常一样返回ModelAndView: public ModelAndView returnView( Model model ) { model.addAttribute( "myStaff", "my staff as string" ); return new ModelAndView( "myView" ); } 页面将如何呈现: 你控制它是如何渲染的。 当你返回ModelAndView ,响应有一个HTML页面。 在Ajax调 ...什么样的参数呢? 如果你敢于深入研究,ThreadLocals中实际上提供了很多Spring东西。 你可以在绑定过程中注入东西: @ControllerAdvice public class FooControllerAdvice { @InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor( Date.class, ...根据Roman C评论,没有回到浏览器就无法实现我想做的事情,以便它可以发出POST请求。 所以我通过重新构建代码并专注于JSP来实现我想要做的事情。
Showing available Service Providers :
您可以使用@RequestBody注释: @PutMapping("/users/{id}") public void update(@PathVariable Long id, @RequestBody User user) { service.update(user); } You can use @RequestBody annotation: @PutMapping("/users/{id}") public void update(@PathVariable Long id, @Req ...是的,当请求是POST时,可以发回响应。 您不必添加任何特定标头。 I found the problem.. The @CrossOrigin creates automatically these two headers: "Access-Control-Allow-Origin" "Access-Control-Allow-Credentials" Since I was also adding them manually, these two headers appears twice.. Ther ...因为你只是在POST后渲染 searchView视图,而不是重定向到某个地方。 如果您确实想要Redirect ,请使用redirect: prefix。 假设您有一个/search端点,并在/上成功POST后重定向到它,然后: @RequestMapping(value = "/", method = RequestMethod.POST) public String search_Post(@RequestParam(value = "title", required = true) String ti ...我用以下方式解决了我的问题: 这是Controller类: package com.mvc.spring; import java.util.List; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.Mod ...在方法返回@ResponseBody之前使用@ResponseBody ..它应该可以解决您的问题。 所以应该是这样的 @Controller @RequestMapping("/services") public class RestService { @RequestMapping(value = "/test/post", method = RequestMethod.POST) public @ResponseBody void postTest(@RequestBody Stri ...相关文章
更多- jstl c:url教程-jstl输出url标签
- JS URL编码函数
- solr 通过URL删除索引
- url编码转换的问题
- javascript url编码
- URL阅读债
- 在Rails中如何打开一个外部URL,并得到该URL的返回结果。
- 请问如何发送一个URL后接受URL返回过来的信息
- 怎么在 Fitler 中取得 jsp:include 中的URL
- solr 通过URL的方式删除索引
最新问答
更多- 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
- 如何打破按钮上的生命周期循环(How to break do-while loop on button)
- C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
- 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
- 如何并排放置两个元件?(How to position two elements side by side?)
- 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
- 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
- Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
- 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
- 电脑高中毕业学习去哪里培训
- 电脑系统专业就业状况如何啊?
- IEnumerable
linq表达式(IEnumerable linq expressions) - 如何在Spring测试中连接依赖关系(How to wire dependencies in Spring tests)
- Solr可以在没有Lucene的情况下运行吗?(Can Solr run without Lucene?)
- 如何保证Task在当前线程上同步运行?(How to guarantee that a Task runs synchronously on the current thread?)
- 在保持每列的类的同时向数据框添加行(Adding row to data frame while maintaining the class of each column)
- 的?(The ? marks in emacs/haskell and ghc mode)
- 一个线程可以调用SuspendThread传递自己的线程ID吗?(Can a thread call SuspendThread passing its own thread ID?)
- 延迟socket.io响应,并“警告 - websocket连接无效”(Delayed socket.io response, and “warn - websocket connection invalid”)
- 悬停时的图像转换(Image transition on hover)
- IIS 7.5仅显示homecontroller(IIS 7.5 only shows homecontroller)
- 没有JavaScript的复选框“关闭”值(Checkbox 'off' value without JavaScript)
- java分布式框架有哪些
- Python:填写表单并点击按钮确认[关闭](Python: fill out a form and confirm with a button click [closed])
- PHP将文件链接到根文件目录(PHP Linking Files to Root File Directory)
- 我如何删除ListView中的项目?(How I can remove a item in my ListView?)
- 您是否必须为TFS(云)中的每个BUG创建一个TASK以跟踪时间?(Do you have to create a TASK for every BUG in TFS (Cloud) to track time?)
- typoscript TMENU ATagParams小写(typoscript TMENU ATagParams lowercase)
- 武陟会计培训类的学校哪个好点?
- 从链接中删除文本修饰(Remove text decoration from links)