Use the aop intercept method and modify the value of the specified parameters in the method

problem description

I use aop to intercept a series of methods with insert, such as
void insertA (string a _ line string b)
void insertB (string a _ line string c)
void insertC (string a _ line string d)
void insertD (string a _ line string e)
then judge its parameter, and if the parameter name is a, change its value to "hello world".

how should I do this? Do you have any ideas to provide.

May.08,2021

define pointcut excution matching method directly, around pointcut pointcut (execution ( package path. Method (String,String)) and args (parameter name, parameter name)


Object [] args = pjp.getArgs (); / /

in

around method

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b3cd-2c25b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b3cd-2c25b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?