@ConfigurationProperties(prefix = "table"
)
public
class
WhiteListConfig {
private
List<String>
whiteList;
public
List<String>
getWhiteList() {
return
whiteList;
public
void
setWhiteList(List<String>
whiteList) {
this
.whiteList =
whiteList;
@Autowired
private WhiteListConfig whiteListConfig;
for (String prefix : whiteListConfig.getWhiteList()) {
if (sql.contains(prefix)){
return error("视图sql中不能包含基础表!");