阿帕奇骆驼返回SOAP消息,而不是Fault

如何解决阿帕奇骆驼返回SOAP消息,而不是Fault

我通过Camel创建SOAP Web服务。现在,我尝试处理错误。 问题是我的wsdl没有Fault元素,因此我需要返回消息来代替Fault。 我明白了:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>The exception org.apache.camel.CamelExchangeException needs to have an WebFault annotation with name and targetNamespace</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

但是我需要这个

<ns2:Envelope xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://mbtc.ru/xws/StopList" xmlns:ns4="http://uralfd.hostco.ru/messages/credit/v01">
   <ns2:Body>
      <ns4:SF_A_StopList_INTType ns4:MessageID="?">
         <ns4:Error>
            <ns4:ErrorCode>99</ns4:ErrorCode>
            <ns4:ErrorText>Error message</ns4:ErrorText>
         </ns4:Error>
      </ns4:SF_A_StopList_INTType>
   </ns2:Body>
</ns2:Envelope>

您可以看到我得到了异常:

java.lang.RuntimeException:org.apache.camel.CamelExchangeException异常需要具有名称和targetNamespace的WebFault注释

蓝图

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
           xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
           xsi:schemaLocation="
           http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
">
    <cm:property-placeholder id="properties.SF2CRE_StopListBP" persistent-id="SF2CRE_StopListBP"
                             placeholder-prefix="{{"
                             placeholder-suffix="}}">
        <cm:default-properties>
            <cm:property name="common.cfg.path" value="src/test/resources/"/>
        </cm:default-properties>
    </cm:property-placeholder>

    <cxf:cxfEndpoint id="incomingEndpoint"
                     address="{{incoming.url}}"
                     serviceClass="ru.hostco.uralfd.messages.credit.v02.StopListInterface">
        <cxf:properties>
            <entry key="dataFormat" value="RAW"/>
        </cxf:properties>
    </cxf:cxfEndpoint>

    <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
        <property name="location" value="blueprint:properties.SF2CRE_StopListBP"/>
    </bean>

    <bean id="shutdown" class="org.apache.camel.impl.DefaultShutdownStrategy">
        <property name="timeout" value="10" />
    </bean>

    <bean class="ru.uralfd.operation.Operation" id="Operation">
        <argument ref="properties"/>
    </bean>

    <bean class="ru.uralfd.operation.SF2CRE_StopListBPAggregationStrategy" id="aggregatorStrategy"/>

    <reference filter="(osgi.jndi.service.name=creCompanyDataSource)" id="dataSource" interface="javax.sql.DataSource" />

    <bean class="org.apache.camel.component.sql.SqlComponent" id="sql">
        <property name="dataSource" ref="dataSource" />
    </bean>

    <camelContext xmlns="http://camel.apache.org/schema/blueprint" useMDCLogging="true" handleFault="true">
        <route id="routeRequest">
            <from uri="incomingEndpoint"/>
            <convertBodyTo type="String"/>
            <log message="SF2CRE_StopListBP breadcrumbId: ${headers.breadcrumbId} body: ${body}"/>
            <doTry>
            <unmarshal>
                <soapjaxb contextPath="ru.hostco.uralfd.messages.credit.v01"/>
            </unmarshal>
            <bean ref="Operation" method="checkType"/>

            <log message="SF2CRE_StopListBP Service1 after checkType ${headers}"/>

            <multicast strategyRef="aggregatorStrategy" stopOnException="true" strategyMethodAllowNull="true">
                <pipeline id="requestPerson">
                    <choice>
                        <when>
                            <simple>${headers.ReqPerson}</simple>
                            <bean ref="Operation" method="stopListPerson"/>
                        </when>
                    </choice>
                </pipeline>
                <pipeline id="requestDocument">
                    <choice>
                        <when>
                            <simple>${headers.ReqDocument} and ${headers.NoResponse}</simple>
                            <bean ref="Operation" method="stopListDocument"/>
                        </when>
                    </choice>
                </pipeline>
                <pipeline id="requestFull">
                    <choice>
                        <when>
                            <simple>${headers.ReqFull}</simple>
                            <bean ref="Operation" method="stopListFull"/>
                        </when>
                    </choice>
                </pipeline>
                <pipeline id="requestCompany">
                    <choice>
                        <when>
                            <simple>${headers.ReqCompany}</simple>
                            <to uri="sql:SELECT * FROM getStopListMLF2(:#RequestINNs,:#RequestDate)?outputClass=ru.uralfd.database.StopListMLF"/>
                            <bean ref="Operation" method="processCompanyResponse"/>
                        </when>
                    </choice>
                </pipeline>
            </multicast>
                <doCatch>
                    <exception>java.lang.Exception</exception>
                    <handled>
                        <constant>true</constant>
                    </handled>
                    <log loggingLevel="ERROR" message="SF2CRE_StopListBP breadcrumbId: ${headers.breadcrumbId} ERROR in ${routeId}.\n Exception.message: ${exception.message}.\n Exception_stacktrace: ${exception.stacktrace}." />
                    <bean ref="Operation" method="processException"/>
                </doCatch>
            </doTry>
            <to uri="direct:answer"/>
        </route>
        <route id="routeResponse">
            <from uri="direct:answer"/>
            <marshal>
                <soapjaxb contextPath="ru.hostco.uralfd.messages.credit.v01" encoding="UTF-8"/>
            </marshal>
            <convertBodyTo type="String"/>
            <log message="SF2CRE_StopListBP finish breadcrumbId: ${headers.breadcrumbId} body: ${body}"/>
        </route>
    </camelContext>
</blueprint>

processException

public SFAStopListINTType processException(Exchange exchange) throws Exception {
        String messageId = exchange.getIn().getHeader("RequestMessageID",String.class);
        Exception e = exchange.getProperty(Exchange.EXCEPTION_CAUGHT,Exception.class);
        return createEmptyResponse(messageId,"SF2CRE_StopList: "+e.getMessage(),ErrList.ERR_99.code());
    }

日志消息

2020-08-18T16:27:36,450 | ERROR | qtp240236697-529 | routeRequest                     | 53 - org.apache.camel.camel-core - 2.25.1 | SF2CRE_StopListBP breadcrumbId: ID-ws-00-705-1597731451094-21-15 ERROR in routeRequest.
 Exception.message: Sequential processing failed for number 3. Exchange[ID-ws-00-705-1597731451094-21-26]. Caused by: [org.springframework.jdbc.BadSqlGrammarException - PreparedStatementCallback; bad SQL grammar []; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'getStopListMLF2'.].
 Exception_stacktrace: org.apache.camel.CamelExchangeException: Sequential processing failed for number 3. Exchange[ID-ws-00-705-1597731451094-21-26]. Caused by: [org.springframework.jdbc.BadSqlGrammarException - PreparedStatementCallback; bad SQL grammar []; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'getStopListMLF2'.]
    at org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:658)
    at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:248)
...
2020-08-18T16:27:36,451 | INFO  | qtp240236697-529 | routeRequest                     | 53 - org.apache.camel.camel-core - 2.25.1 | SF2CRE_StopListBP breadcrumbId: ID-ws-00-705-1597731451094-21-15 after exception body: ru.hostco.uralfd.messages.credit.v01.SFAStopListINTType@20b99c1b[messageID=ECCB37C6-8D94-49E3-B604-5E2FAEA1CF8B,error=ru.hostco.uralfd.messages.credit.v01.ErrorResultType@2ed5fc38[errorCode=99,errorText=SF2CRE_StopList: Sequential processing failed for number 3. Exchange[ID-ws-00-705-1597731451094-21-26]. Caused by: [org.springframework.jdbc.BadSqlGrammarException - PreparedStatementCallback; bad SQL grammar []; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'getStopListMLF2'.]],result=<null>]
 head: {accept-encoding=gzip,deflate,breadcrumbId=ID-ws-00-705-1597731451094-21-15,CamelCxfMessage={http.base.path=http://localhost:9080/SF2CRE_StopListBPWeb/sca,HTTP.REQUEST=Request(POST //localhost:9080/SF2CRE_StopListBPWeb/sca/StopList_Int_WS)@6ec89547,org.apache.cxf.transport.Destination=org.apache.cxf.transport.http_jetty.JettyHTTPDestination@49ce593,HTTP.CONFIG=null,org.apache.cxf.binding.soap.SoapVersion=org.apache.cxf.binding.soap.Soap11@4986b73b,org.apache.cxf.message.Message.QUERY_STRING=null,org.apache.cxf.message.Message.ENCODING=UTF-8,HTTP.CONTEXT=ServletContext@o.e.j.s.h.ContextHandler@235ee7ba{/SF2CRE_StopListBPWeb/sca,null,AVAILABLE},Content-Type=text/xml;charset=UTF-8,org.apache.cxf.security.SecurityContext=org.apache.cxf.transport.http.AbstractHTTPDestination$2@600f66ee,org.apache.cxf.continuations.ContinuationProvider=org.apache.cxf.transport.http.Servlet3ContinuationProvider@6430fe37,org.apache.cxf.message.Message.PROTOCOL_HEADERS={accept-encoding=[gzip,deflate],connection=[keep-alive],Content-Length=[1105],content-type=[text/xml;charset=UTF-8],Host=[localhost:9080],SOAPAction=["getStopList"],User-Agent=[Apache-HttpClient/4.1.1 (java 1.5)]},org.apache.cxf.request.url=http://localhost:9080/SF2CRE_StopListBPWeb/sca/StopList_Int_WS,Accept=null,org.apache.cxf.request.uri=/SF2CRE_StopListBPWeb/sca/StopList_Int_WS,org.apache.cxf.message.Message.PATH_INFO=/SF2CRE_StopListBPWeb/sca/StopList_Int_WS,org.apache.cxf.transport.https.CertConstraints=null,HTTP.RESPONSE=HTTP/1.1 200 
Date: Tue,18 Aug 2020 11:27:36 GMT,org.apache.cxf.request.method=POST,org.apache.cxf.async.post.response.dispatch=true,org.apache.cxf.message.Message.IN_INTERCEPTORS=[org.apache.cxf.transport.https.CertConstraintsInterceptor@6bd0dcdb],HTTP_CONTEXT_MATCH_STRATEGY=stem,http.service.redirection=null,org.apache.cxf.message.Message.BASE_PATH=/SF2CRE_StopListBPWeb/sca/StopList_Int_WS,org.apache.cxf.configuration.security.AuthorizationPolicy=null,org.apache.cxf.message.Message.FIXED_PARAMETER_ORDER=false},CamelHttpCharacterEncoding=UTF-8,CamelHttpMethod=POST,CamelHttpPath=,CamelHttpUri=/SF2CRE_StopListBPWeb/sca/StopList_Int_WS,connection=keep-alive,Host=localhost:9080,MulticastStep=false,NoResponse=true,org.apache.camel.dataformat.soap.UNMARSHALLED_HEADER_LIST=[],ReqCompany=true,ReqDocument=false,ReqFull=true,ReqPerson=false,RequestDate=Tue Jul 28 15:00:00 YEKT 2020,RequestINNs=5911063879,5911013211,RequestMessageID=ECCB37C6-8D94-49E3-B604-5E2FAEA1CF8B,SOAPAction="getStopList",User-Agent=Apache-HttpClient/4.1.1 (java 1.5)}
2020-08-18T16:27:36,452 | ERROR | qtp240236697-529 | DefaultErrorHandler              | 53 - org.apache.camel.camel-core - 2.25.1 | Failed delivery for (MessageId: ID-ws-00-705-1597731451094-21-28 on ExchangeId: ID-ws-00-705-1597731451094-21-15). Exhausted after delivery attempt: 1 caught: java.lang.RuntimeException: The exception org.apache.camel.CamelExchangeException needs to have an WebFault annotation with name and targetNamespace

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
[routeRequest      ] [routeRequest      ] [http://localhost:9080/SF2CRE_StopListBPWeb/sca/StopList_Int_WS                ] [       217]
[routeRequest      ] [convertBodyTo38   ] [convertBodyTo[String]                                                         ] [         0]
[routeRequest      ] [log288            ] [log                                                                           ] [         3]
[routeRequest      ] [doTry21           ] [doTry                                                                         ] [       213]
[routeRequest      ] [unmarshal22       ] [unmarshal[org.apache.camel.model.dataformat.SoapJaxbDataFormat@616dfea7]      ] [         1]
[routeRequest      ] [bean125           ] [bean[ref:Operation method:checkType]                                          ] [         2]
[routeRequest      ] [log289            ] [log                                                                           ] [         2]
[routeRequest      ] [multicast22       ] [multicast                                                                     ] [       206]
[routeRequest      ] [log299            ] [log                                                                           ] [         1]
[routeRequest      ] [bean130           ] [bean[ref:Operation method:processException]                                   ] [         0]
[routeRequest      ] [log300            ] [log                                                                           ] [         1]
[routeRequest      ] [to42              ] [direct:answer                                                                 ] [         0]
[routeResponse     ] [marshal12         ] [marshal[org.apache.camel.model.dataformat.SoapJaxbDataFormat@5919bb62]        ] [         1]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
java.lang.RuntimeException: The exception org.apache.camel.CamelExchangeException needs to have an WebFault annotation with name and targetNamespace
    at org.apache.camel.dataformat.soap.Soap11DataFormatAdapter.createFaultFromException(Soap11DataFormatAdapter.java:119) ~[?:?]
    at org.apache.camel.dataformat.soap.Soap11DataFormatAdapter.doMarshal(Soap11DataFormatAdapter.java:81) ~[?:?]
    at org.apache.camel.dataformat.soap.SoapJaxbDataFormat.marshal(SoapJaxbDataFormat.java:147) ~[?:?]
    at org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:69) ~[?:?]
    at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:42) ~[?:?]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110) ~[?:?]
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) ~[?:?]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) ~[?:?]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) ~[?:?]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
    at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:76) ~[?:?]
    at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[?:?]
    at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:42) ~[?:?]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:110) ~[?:?]
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) ~[?:?]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) ~[?:?]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) ~[?:?]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) ~[?:?]
    at org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.asyncInvoke(CxfConsumer.java:185) ~[!/:2.25.1]
    at org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.invoke(CxfConsumer.java:161) ~[!/:2.25.1]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[!/:3.3.6]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_121]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_121]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126) ~[!/:3.3.6]
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) ~[!/:3.3.6]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131) ~[!/:3.3.6]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[!/:3.3.6]
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[!/:3.3.6]
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) ~[!/:3.3.6]
    at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247) ~[!/:3.3.6]
    at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79) ~[!/:3.3.6]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1363) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1278) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.Server.handle(Server.java:500) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [!/:9.4.28.v20200408]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [!/:9.4.28.v20200408]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

我可以禁止在骆驼响应时创建故障消息吗? 也许我需要另一种方式?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-