Question Details

No question body available.

Tags

java spring spring-boot

Answers (1)

July 9, 2026 Score: 1 Rep: 11 Quality: Low Completeness: 50%

I tried the exact same project structure and code with Spring boot 3 and it works correctly. The OrderService bean is detected and the /orders endpoint returns the expected response.
Since the code looks correct, try rebuilding the project and refreshing the dependencies, You can run a clean build ,for example: mvn clean install
or refresh or reimport the Maven project in IDE. This error usually happens when Spring cannot find the component during component scanning, the package structure is incorrect, or the class is not included in the application context.