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

PathMatchingResourcePatternResolver should not log directory-skip messages at info level #33954

Closed
CHOICORE opened this issue Nov 25, 2024 · 3 comments
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another type: regression A bug that is also a regression

Comments

@CHOICORE
Copy link
Contributor

CHOICORE commented Nov 25, 2024

I started seeing unexpected logs after upgrading Spring Boot from version 3.3.4 to 3.4.0.

Skipping search for files matching pattern [**/*.class]: directory [/Users/core/workspace/me/projects/samples/test/dependencies/build/classes/java/main/me/choicore/samples/test/api] does not exist
rootPorject
ㄴ applicaion-module
    ㄴ src
        ㄴmain
            ㄴ java
                ㄴ me/choicore/samples/test
                    ㄴ api
                        ㄴ Application.java (entrypoint)
ㄴ dependencies-module
    ㄴ src
        ㄴ main
            ㄴ java
                ㄴ me/choicore/samples/test
                    ㄴ dependencies
...
image

The project is set up as a multi-module structure, and as shown in the image, the entry point is located under the API package.

image

After analyzing line 695 of PathMatchingResourcePatternResolver.class, I found a process that creates sub-resources. While the dependencies-module doesn't contain a package named 'api', related logs are being generated.
Although the application starts up normally, these logs keep appearing. If this is intended behavior, shouldn't we consider adjusting the logging level

If analysis is needed, I will attach a test project.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 25, 2024
@bclozel bclozel transferred this issue from spring-projects/spring-boot Nov 25, 2024
@bclozel bclozel added the in: core Issues in core modules (aop, beans, core, context, expression) label Nov 25, 2024
@jhoeller
Copy link
Contributor

Good point, we should switch to debug log level there.

@jhoeller jhoeller added type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 25, 2024
@jhoeller jhoeller added this to the 6.2.1 milestone Nov 25, 2024
@jhoeller jhoeller changed the title Spring Boot 3.4.0 PathMatchingResourcePatternResolver incorrect behavior PathMatchingResourcePatternResolver should not log directory-skip messages at info level Nov 25, 2024
@CHOICORE
Copy link
Contributor Author

CHOICORE commented Nov 25, 2024

Good point, we should switch to debug log level there.

Submitted a pull request for this simple fix.

fixed #33956

@snicoll
Copy link
Member

snicoll commented Nov 26, 2024

Closing in favor of PR #33956

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@snicoll snicoll removed this from the 6.2.1 milestone Nov 26, 2024
@snicoll snicoll added the status: superseded An issue that has been superseded by another label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

5 participants