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

[#1236] wip: trying to remove Spring warnings #1266

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lprimak
Copy link
Contributor

@lprimak lprimak commented Jan 6, 2024

fixes #1236

Following this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GitHub issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a GitHub issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [#XXX] - Fixes bug in SessionManager,
    where you replace #XXX with the appropriate GitHub issue. Best practice
    is to use the GitHub issue title in the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • add fixes #XXX if merging the PR should close a related issue.
  • Run mvn verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Committers: Make sure a milestone is set on the PR

Trivial changes like typos do not require a GitHub issue (javadoc, comments...).
In this case, just format the pull request title like [DOC] - Add javadoc in SessionManager.

If this is your first contribution, you have to read the Contribution Guidelines

If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement
if you are unsure please ask on the developers list.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@lprimak lprimak changed the title [#1236 ] wip: trying to remove warnings [#1236] wip: trying to remove warnings Jan 6, 2024
@lprimak lprimak changed the title [#1236] wip: trying to remove warnings [#1236] wip: trying to remove Spring warnings Jan 6, 2024
@lprimak lprimak added the help-wanted Help Wanted label Jan 7, 2024
@lprimak lprimak added the spring Spring and SpringBoot label Apr 6, 2024
@lprimak lprimak added this to the Backlog milestone May 22, 2024
@UncleLiuYe
Copy link

Hi, when can this be merged and released?

@lprimak
Copy link
Contributor Author

lprimak commented Jun 20, 2024

This PR doesn't work and help is needed to resolve the warnings.

@UncleLiuYe
Copy link

how can I help you resolve the warning?

@lprimak
Copy link
Contributor Author

lprimak commented Jun 20, 2024

We will gladly accept a PR that removes the warnings from the code. We have limited Spring expertise on the Shiro team to debug this issue.

@UncleLiuYe
Copy link

I added the above code to the clone shiro code, retranslated it, and spring worked normally, no warning appeared.

@lprimak
Copy link
Contributor Author

lprimak commented Jun 20, 2024

I just re-ran the sample with this PR, warnings are still there:

% java -jar samples-spring-boot-3-web-2.0.0-SNAPSHOT.war
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.0)

2024-06-19T22:48:19.825-05:00  INFO 21873 --- [           main] org.apache.shiro.samples.WebApp          : Starting WebApp using Java 22.0.1 with PID 21873 (/Users/lprimak/dev/shiro/samples/spring-boot-3-web/target/samples-spring-boot-3-web-2.0.0-SNAPSHOT.war started by lprimak in /Users/lprimak/dev/shiro/samples/spring-boot-3-web/target)
2024-06-19T22:48:19.831-05:00  INFO 21873 --- [           main] org.apache.shiro.samples.WebApp          : No active profile set, falling back to 1 default profile: "default"
2024-06-19T22:48:21.644-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'realm' of type [org.apache.shiro.realm.text.TextConfigurationRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [shiroEventBusAwareBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.777-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'authorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [shiroEventBusAwareBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.786-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'shiroFilterChainDefinition' of type [org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.793-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestContextFilter' of type [org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.809-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration' of type [org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.814-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'formContentFilter' of type [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.869-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'server-org.springframework.boot.autoconfigure.web.ServerProperties' of type [org.springframework.boot.autoconfigure.web.ServerProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.874-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration' of type [org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.876-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'characterEncodingFilter' of type [org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.883-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration' of type [org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:21.899-05:00  WARN 21873 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'globalFilters' of type [java.util.Collections$SingletonList] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-19T22:48:22.312-05:00  INFO 21873 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8080 (http)
2024-06-19T22:48:22.331-05:00  INFO 21873 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-06-19T22:48:22.332-05:00  INFO 21873 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.24]
2024-06-19T22:48:22.461-05:00  INFO 21873 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-06-19T22:48:22.463-05:00  INFO 21873 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2502 ms
2024-06-19T22:48:23.245-05:00  INFO 21873 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8080 (http) with context path '/'
2024-06-19T22:48:23.267-05:00  INFO 21873 --- [           main] org.apache.shiro.samples.WebApp          : Started WebApp in 4.487 seconds (process running for 5.538)
^C%                                                                                                                                                                                    

@UncleLiuYe
Copy link

can you send me your test code?

@lprimak
Copy link
Contributor Author

lprimak commented Jun 20, 2024

It's samples/spring-boot-3-web within this repository.
Thank you!

@UncleLiuYe
Copy link

image
I got an error when I ran it.

@lprimak
Copy link
Contributor Author

lprimak commented Jun 20, 2024

Run it from the command line. Unfortunately I can't help you with IDE issues

@UncleLiuYe
Copy link

Hello, I submitted the modified code to your forked shiro project, which solved the warnings of shiro-related classes.

@lprimak
Copy link
Contributor Author

lprimak commented Jun 21, 2024

Hi, Evan,

Thank you for your contribution!
However, I am still seeing warnings.
I didn't look into this in depth whether they are the same or new warnings, but nonetheless they are still there:

% java -jar samples-spring-boot-3-web-2.0.0-SNAPSHOT.war
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.0)

2024-06-21T13:58:45.543-05:00  INFO 39834 --- [           main] org.apache.shiro.samples.WebApp          : Starting WebApp using Java 22.0.1 with PID 39834 (/Users/lprimak/dev/shiro/samples/spring-boot-3-web/target/samples-spring-boot-3-web-2.0.0-SNAPSHOT.war started by lprimak in /Users/lprimak/dev/shiro/samples/spring-boot-3-web/target)
2024-06-21T13:58:45.550-05:00  INFO 39834 --- [           main] org.apache.shiro.samples.WebApp          : No active profile set, falling back to 1 default profile: "default"
2024-06-21T13:58:47.236-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'realm' of type [org.apache.shiro.realm.text.TextConfigurationRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [shiroEventBusAwareBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.310-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'authorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [shiroEventBusAwareBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.321-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'shiroFilterChainDefinition' of type [org.apache.shiro.spring.web.config.DefaultShiroFilterChainDefinition] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.328-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'requestContextFilter' of type [org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.339-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration' of type [org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.343-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'formContentFilter' of type [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.397-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'server-org.springframework.boot.autoconfigure.web.ServerProperties' of type [org.springframework.boot.autoconfigure.web.ServerProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.402-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration' of type [org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.405-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'characterEncodingFilter' of type [org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.414-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration' of type [org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.431-05:00  WARN 39834 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'globalFilters' of type [java.util.Collections$SingletonList] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor []? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-06-21T13:58:47.839-05:00  INFO 39834 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8080 (http)
2024-06-21T13:58:47.859-05:00  INFO 39834 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-06-21T13:58:47.860-05:00  INFO 39834 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.24]
2024-06-21T13:58:47.976-05:00  INFO 39834 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-06-21T13:58:47.978-05:00  INFO 39834 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2298 ms
2024-06-21T13:58:48.800-05:00  INFO 39834 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8080 (http) with context path '/'
2024-06-21T13:58:48.824-05:00  INFO 39834 --- [           main] org.apache.shiro.samples.WebApp          : Started WebApp in 4.257 seconds (process running for 5.194)

@github-actions github-actions bot added the Stale label Sep 20, 2024
@github-actions github-actions bot closed this Sep 27, 2024
@lprimak lprimak reopened this Sep 27, 2024
@lprimak lprimak removed the Stale label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Help Wanted spring Spring and SpringBoot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BeanPostProcessorChecker] WARN o.s.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
2 participants