We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When adding AAA required permission checking logic, the query user's SQL will execute three times for every time call.
@GetAction("{id}") public Admin read(@NotNull Long id, String fields) { AAA.requirePermission(Permissions.PERM_ADMIN_READ); PropertySpec.current.set(fields); Admin admin = dao.findById(id); notFoundIfNull(admin, context.i18n(Messages.ENTITY_ID_NOT_FOUND, Admin.KEY, id)); logger.debug("Read admin by id -> {}", id); return admin; }
When call read admin method. the logs shows the query login user with execute 3 times.
16:07:41.670 [XNIO-1 task-3] DEBUG e.logging.sql - SELECT ID, create_time, EMAIL, last_update, login_name, MOBILE, NAME, PASSWORD, PHONE, ROLES, SALT, STATE, VERSION FROM bb_admin WHERE (login_name = ?) bind => [admin] 16:07:41.672 [XNIO-1 task-3] DEBUG e.logging.sql - SELECT ID, create_time, EMAIL, last_update, login_name, MOBILE, NAME, PASSWORD, PHONE, ROLES, SALT, STATE, VERSION FROM bb_admin WHERE (login_name = ?) bind => [admin] 16:07:41.673 [XNIO-1 task-3] DEBUG e.logging.sql - SELECT ID, create_time, EMAIL, last_update, login_name, MOBILE, NAME, PASSWORD, PHONE, ROLES, SALT, STATE, VERSION FROM bb_admin WHERE (login_name = ?) bind => [admin] 16:07:41.675 [XNIO-1 task-3] DEBUG e.logging.sql - SELECT ID, create_time, EMAIL, last_update, login_name, MOBILE, NAME, PASSWORD, PHONE, ROLES, SALT, STATE, VERSION FROM bb_admin WHERE (ID = ?) bind => [1] 16:07:41.676 [XNIO-1 task-3] DEBUG c.b.n.a.AdminEndpoint - Read admin by id -> 1
Is there any way to optimize this?
The text was updated successfully, but these errors were encountered:
@leeaee the cache mechanism introduced with #32 should fixed the issue.
Sorry, something went wrong.
No branches or pull requests
When adding AAA required permission checking logic, the query user's SQL will execute three times for every time call.
When call read admin method. the logs shows the query login user with execute 3 times.
Is there any way to optimize this?
The text was updated successfully, but these errors were encountered: