我只想将第一个单词提取到第一个空格。
\n我使用了以下查询:
\nselect upper(substring(substring(descripcion,28),0,length(substring(descripcion,28))-position(' ' in reverse(substring(descripcion,28)))+1)) from evento where descripcion ~ 'Act. datos:Actualizaci\xc3\xb3n';\nRun Code Online (Sandbox Code Playgroud)\n但它给了我所有的东西,而不仅仅是第一个空格之前的第一个单词。
\n我怎样才能得到以下结果
\nETC。
\n我刚刚加入一个新项目,但在创建控制器中具有 @RequestPart 注释的对象时遇到问题
这是控制器:
和服务:
我应该如何发送创建可交付对象的请求?
我尝试了几种方法,但总是收到错误:请求不包含多部分/表单数据或多部分/混合流,内容类型标头是 application/json
感谢您的帮助!
编辑:
以下是邮递员配置的图像
2021-09-27 10:57:11.279 ERROR 148 --- [nio-8050-exec-5] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/portal-cliente-api] threw exception [Request processing failed; nested exception is java.util.NoSuchElementException: No value present] with root cause
Run Code Online (Sandbox Code Playgroud)
java.util.NoSuchElementException:在 security.innotec.portalcliente.service.impl.DeliverableServiceImpl.insert(DeliverableServiceImpl.java) 的 java.util.Optional.get(Optional.java:135) ~[?:1.8.0_201] 处没有值:78) ~[classes/:?] at security.innotec.portalcliente.service.impl.DeliverableServiceImpl$$FastClassBySpringCGLIB$$b02f851b.invoke() ~[classes/:?] at org.springframework.cglib.proxy.MethodProxy。调用(MethodProxy.java:218)〜[spring-core-5.2.8.RELEASE.jar:5.2.8.RELEASE]在org.springframework.aop.framework.CglibAopProxy $ CglibMethodInitation.invokeJoinpoint(CglibAopProxy.java:771)〜 [spring-aop-5.2.8.RELEASE.jar:5.2.8.RELEASE] 位于 org.springframework.aop.framework.ReflectiveMethodInspiration.proceed(ReflectiveMethodInitation.java:163) ~[spring-aop-5.2.8.RELEASE。 jar:5.2.8.RELEASE] 在 org.springframework.aop.framework.CglibAopProxy$CglibMethodInspiration.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.8.RELEASE.jar:5.2.8.RELEASE] 在org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367) ~[spring-tx-5.2.8.RELEASE.jar:5.2.8.RELEASE] 在 org.springframework.transaction.interceptor.TransactionInterceptor.invoke (TransactionInterceptor.java:118) ~[spring-tx-5.2.8.RELEASE.jar:5.2.8.RELEASE] 在 org.springframework.aop.framework.ReflectiveMethodInitation.proceed(ReflectiveMethodInitation.java:186) ~[spring- aop-5.2.8.RELEASE.jar:5.2.8.RELEASE] 在 org.springframework.aop.framework.CglibAopProxy$CglibMethodInitation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.8.RELEASE.jar :5.2.8.RELEASE] …