Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
544 views
in Technique[技术] by (71.8m points)

java自己实现一个注解怎么执行自己解析的代码?

定义注解会了
用反射解析注解会了

我看别人的例子是在main函数里调用自己写的代码运行的,我的疑问是比如spring boot项目已经有了一个main函数,我的代码放在哪里?放到这个main里面吗?

我想根据注解写一个文件或者动态生成代码,生成后在再运行实际的代码,可行吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

代码写在控制器里啊


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...