先看下源码
@PostMapping(value = "url")
public Envelop create(@RequestParam String jsonData);
下面是启动报错日志
Caused by: java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
看提示很明显是参数问题,RequestParam注解的第一个参数是不能为空
简单粗暴的把RequestParam注解去掉,启动成功。再试试加上注解的描述
修改成:
@PostMapping(value = "url")
public Envelop create(@RequestParam(value = "jsonData", required = true) String jsonData);
这样启动成功,ok解决了。
相关推荐
org.springframework.web.bind.annotation.RequestParam.class org.springframework.web.bind.annotation.SessionAttributes.class org.springframework.web.bind.support.ConfigurableWebBindingInitializer.class ...
Classes contained in spring-mock.jar: org.springframework.mock.jndi.ExpectedLookupTemplate.class org.springframework.mock.jndi.SimpleNamingContext.class org.springframework.mock.jndi....
对应@RequestParam基本类型的参数我们最好都使用包装类型 还有相识的注解 @RequestHeader。使用方式和@RequestParam一样。
org.springframework.aop-3.0.4.RELEASE.jar org.springframework.asm-3.0.4.RELEASE.jar org.springframework.aspects-3.0.4.RELEASE.jar org.springframework.beans-3.0.4.RELEASE.jar org.springframework....
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0': Error setting property values; nested ...
org.springframework.asm-3.0.5.RELEASE.jar
spring 3.2.4 Realease 的所有jar包: spring-context-3.2.4.RELEASE.jar spring-core-3.2.4.RELEASE.jar spring-beans-3.2.4.RELEASE.jar spring-test-3.2.4.RELEASE.jar spring-web-3.2.4.RELEASE.jar spring-aop-...
aopalliance-1.0.jar,org.springframework.aop-3.0.0.RELEASE.jar,org.springframework.jdbc-3.0.0.RELEASEorg.springframework.beans-3.0.0.RELEASE.jar等
org.springframework.transaction-3.2.2.RELEASE最新版本
spring3.1官方所有的jar包 org.springframework.aop-3.1.RELEASE.jar org.springframework.asm-3.1.RELEASE.jar org.springframework.aspects-3.1.RELEASE.jar org.springframework.beans-3.1.RELEASE.jar org....
通过import org.springframework.web.multipart.MultipartFile;上传文件的一个工具性的jar.
org.springframework.context-3.1.1.RELEASE.jar java 开发专用
rg.springframework.asm-3.0.1.RELEASE-A.jar
org.springframework.web-3.0.1.RELEASE-A
此压缩文件中包含spring的如下组件的doc,source,jar: spring-aop-4.1.6.RELEASE.jar spring-aspects-4.1.6.RELEASE.jar spring-beans-4.1.6.RELEASE.jar spring-context-4.1.6.RELEASE.jar spring-context-...
spring-webmvc-struts.jar对Struts和Spring整合时需要用到的包
org.springframework.orm-3.0.0.M1.jar
包含spring 3.0.5的所有jar文件: org.springframework.aop-3.0.5.RELEASE.jar org.springframework.asm-3.0.5.RELEASE.jar org.springframework.aspects-3.0.5.RELEASE.jar org.springframework.beans-3.0.5.RELEASE...
org.springframework.web-3.0.5.RELEASE.jar
Error creating bean with name 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0' defined in ServletContext resource [/WEB-INF/springMVC-servlet.xml]: Initialization of bean failed;...