0
我有終點類:的Spring Web服務1.5.2不洛例外日誌文件(積壓,春季啓動1.5.2)
@Endpoint
public class GetCustomerEndpoint {
public static final Logger log = LoggerFactory.getLogger(GetCustomerEndpoint .class);
@Transactional(value = "transactionManager", readOnly = true)
@PayloadRoot(namespace = WebServiceConfig.NAMESPACE_URI, localPart = "getCustomerRequest")
@ResponsePayload
public GetCustomerResponse getCustomer(@RequestPayload GetCustomerRequest serviceRequest)
throws ServerFaultException, ClientFaultException, Exception {
throw new Exception("Exception to log file");
}
但是,當異常拋出它顯示在客戶端:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring xml:lang="en">Exception to log file</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在日誌文件或控制檯中爲空。 我想在這兩個地方看到所有異常,並且也看到異常堆棧跟蹤。
在我的日誌配置:
logging.level.org.springframework=INFO
嘗試將另一個日誌配置添加到GetCustomerEndpoint的包:logging.level。 =信息 –
謝謝你....! – user2625402