条件注释 - 取决于配置文件

时间:2016-11-21 21:06:37

标签: java spring annotations

我正在使用Spring启动。我想做以下事情:

@IF profile = prod
@CrossOrigin  

我想在application.properties中声明个人资料,@CrossOrigin仅在prod环境中宣布SELECT * FROM (SELECT * FROM my_table ORDER by row_id DESC LIMIT 8) t ORDER BY RAND() 。怎么做?

0 个答案:

没有答案