Question: when wechat authentication defines variables in weixinpaycontroller, the assigned value is obtained by reading the configuration file in initcontroller, which may cause that sometimes the data of the configuration file cannot be read?
Reason: This is caused by the loading order of the controller. First, the class inheritance relationship of weixinpaycontroller is weixinpaycontroller — & gt; absauthcontroller — & gt; basemcccontroller — & gt; mvccontroller. The inheritance relationship of initcontroller class is initcontroller — & gt; mvccontroller. It can be seen that these two controllers are inherited from mvccontroller, so there will be the problem of loading order first and then
Short term solution: when deploying online, test it first, and you can see that there is no problem. If there is no problem, you can. If there is a problem, it will be deployed again, and then detected again
Long term solution: weixinpaycontroller is directly inherited from initcontroller, so that the loading order is fixed and consistent
Read More:
- Mybatis property loading order [How to Solve]
- The influence of the loading order of props, data and computed in Vue
- The scan of annotations for web application [] could not be completed due to a stackoverflower error. Possible root causes include the low setting of – XSS and illegal circular inheritance dependencies. The class hierarchy being processed is
- Error: (21,13) Java: symbol not found: class order location: interface mapper.ordermapper
- Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdb
- “View inheritance may not use attribute ‘string‘ as a selector.
- Access characteristics of construction methods in Java inheritance
- Error inflating class fragment error when loading custom fragment with fragment (valid)
- Initialization order of Java objects
- Higher order components in react
- The method of constructing even order magic square (n = 4 * m)
- The shell runs the class file and imports the jar package that the class depends on
- SAP Migo 101 receives the work order and reports an error – check table tfbefu_ CR entry 10 does not exist – Countermeasures
- Error c2011: “a certain class”: redefinition of “class” type
- greendao insert data UNIQUE constraint failed: PURCHASE_ORDER_TABLE._id (code 1555)
- SAP mm receives the purchase order and reports an error – table t169p entry znmi does not exist-
- Binary tree traversal (preorder, middle order, postorder, hierarchy traversal, depth first, breadth first)
- Problems caused by vs project build order: link: fatal error lnk1181: cannot open input file ‘zoom’_ Ui_ style.lib ‘
- Problems encountered after Maven installation or upgrade: could not find or load main class org.codehaus.plexus .class…..
- soapUI Error Loading WSDL