Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

banner 建议加在PageHelperProperties 进行开关,不建议用代码方式 #824

Open
1 task
1713612859 opened this issue Jul 11, 2024 · 2 comments
Open
1 task

Comments

@1713612859
Copy link

1713612859 commented Jul 11, 2024

pageHelper version:2.0.0

  • 我已在 issues 搜索类似问题,并且不存在相同的问题.
    image
    建议直接再加一个PageHelperProperties 加一个属性为bannnerEnable
    那么则在PageInterceptor 拦截器直接过滤即可。不期望在代码上硬设置
public PageInterceptor() {
        String bannerEnabled = System.getProperty("pagehelper.banner");
        if (StringUtil.isEmpty(bannerEnabled)) {
            bannerEnabled = System.getenv("PAGEHELPER_BANNER");
        }
        //默认 TRUE
        if (StringUtil.isEmpty(bannerEnabled) || Boolean.parseBoolean(bannerEnabled)) {
            log.debug("\n\n" +
                ",------.                           ,--.  ,--.         ,--.                         \n" +
                "|  .--. '  ,--,--.  ,---.   ,---.  |  '--'  |  ,---.  |  |  ,---.   ,---.  ,--.--. \n" +
                "|  '--' | ' ,-.  | | .-. | | .-. : |  .--.  | | .-. : |  | | .-. | | .-. : |  .--' \n" +
                "|  | --'  \\ '-'  | ' '-' ' \\   --. |  |  |  | \\   --. |  | | '-' ' \\   --. |  |    \n" +
                "`--'       `--`--' .`-  /   `----' `--'  `--'  `----' `--' |  |-'   `----' `--'    \n" +
                "                   `---'                                   `--'                        is intercepting.\n");
        }
    }
@abel533
Copy link
Collaborator

abel533 commented Jul 11, 2024

除了 pr#pagehelper/pagehelper-spring-boot#177 还要改哪些?

@1713612859
Copy link
Author

只要加这个配置即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants