当前位置:网站首页>Where is the answer? action config/Interceptor/class/servlet
Where is the answer? action config/Interceptor/class/servlet
2022-07-07 09:19:00 【51CTO】
The project has been tested , In these two days, we have focused on sorting out the code logic of the tripartite payment system developed by the outsourcing team for our company . This afternoon, the Aegean conference room , A student in the development group shared his sorting results of payment result callback .
The overall timing of the payment result callback is : After the payment channel has processed the user's payment information , Actively call the callback address provided by us when the payment is initiated , Push the payment result to us , After our treatment , Write back the string “ok” To inform the payment channel , The channel received this message , Notice of completion of payment results .
At the end of logic, a question is thrown . See the screenshot below for the code , That is, our signature has been verified 、 data verification 、 Update order payment results 、 Bookkeeping 、 Notify downstream merchants and wait for a series of logical processing , To write back a string “ok”.responseString The value of is “ok”. The program directly gives edb This object set A parameter , Then the program return Done. . We know , We must pass the current HttpServletResponse Of getWriter Of print() or write() Method to output this text message to the page . While calling this NotifyServiceIml Of Action There is no such sentence in . that , Here comes the question , Look at the notes below “ After setting this value , The platform will automatically return to the channel ”, How is automatic return to the channel realized ? Where is it implemented ? Then the next step is to find out where these codes are .
First , Brother, open action config file . Look at the backstage Action After successful processing , Corresponding jsp Is there any print in . however , Found no configuration jsp.
So next , Naturally, I think of Interceptor. Locate the corresponding Interceptor class . Through line by line analysis onResponse() Method , And I didn't find out getWriter() Such lines of code .
Strange ! Some students suggested asking the outsourcing programmers directly after the meeting , You can tell by asking . I always like to dig the code first , I really can't ask again . therefore , I took over my colleague's laptop , Harden your head to analyze this Service And the code of its parent class , Maybe there's some sort of code . The result? , Including me , Four or five pairs of eyes did not find . I smile bitterly :“ Yes. !”
In fact, I still admit defeat . Went to the bathroom and returned to the station , Suddenly it occurred to me servlet. Hurry to find servlet-mapping. Sure enough , stay web.xml It's defined in servlet-mapping; Sure enough , In this ActionServlet In class , lookup getWriter The key word found the answer .
⁶⁶ ⁶⁶⁶⁶⁶⁶ ⁶⁶66⁶⁶⁶⁶ ₆₆₆₆ B: yes, you can . This wave of ₆₆₆₆⁶⁶⁶⁶⁶⁶ Oh my god ⁶⁶666⁶⁶⁶⁶⁶⁶66⁶⁶⁶⁶ Oh my god ⁶⁶⁶⁶⁶⁶ ⁶6666⁶⁶666₆₆₆₆₆ 666 ⁶⁶⁶⁶⁶⁶ 666666₆₆₆₆₆₆ ₆⁶⁶⁶ ⁶⁶⁶⁶⁶⁶ ⁶⁶66⁶⁶⁶⁶ ₆₆₆₆ B: yes, you can
边栏推荐
- Mysql database transaction learning notes
- Full link voltage test of the e-commerce campaign Guide
- C语言指针(习题篇)
- PMP certificate preparation experience sharing
- Count the number of words C language
- PMP Exam details after the release of the new exam outline
- Jenkins task grouping
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
- JVM 垃圾回收 详细学习笔记(二)
- 5A summary: seven stages of PMP learning
猜你喜欢
Led analog and digital dimming
Selenium mouse sliding operation event
Detailed learning notes of JVM memory structure (I)
Two schemes of unit test
E-commerce campaign Guide
PMP Exam Preparation experience systematically improve project management knowledge through learning
UnityShader入门精要个人总结--基础篇(一)
Jenkins modifies the system time
Locust performance test 5 (analysis)
Do you have any certificates with high gold content?
随机推荐
Three updates to build applications for different types of devices | 2022 i/o key review
Zen - batch import test cases
Self awakening from a 30-year-old female programmer
Postman data driven
Serializer & modelserializer of DRF serialization and deserialization
Sublime Text4 download the view in bower and set the shortcut key
Original collection of hardware bear (updated on June 2022)
【Istio Network CRD VirtualService、Envoyfilter】
OpenGL frame buffer
Skill review of test engineer before interview
JVM 内存结构 详细学习笔记(一)
正则匹配以XXX开头的,XXX结束的
Data association between two interfaces of postman
【Istio Network CRD VirtualService、Envoyfilter】
Why is access to the external network prohibited for internal services of the company?
Druid monitoring - Introduction to JMX usage and principle
Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
C language pointer (special article)
UnityShader入门精要个人总结--基础篇(一)
SAP MM STO单据的外向交货单创建后新加ITEM?