Description
Hi,
We encountered a perplexing issue while utilizing STS 4.21.0.
Although the system generally (99% of the time) functions smoothly, we intermittently encounter an error when attempting to start a microservice from the Boot Dashboard. The error message is as follows:
Field mapper in xxx.yy.MyService required a bean of type 'xxx.yy.MyMapper' that could not be found.
Our project employs mapstruct, and the necessary Mapper is generated and located within the directory:
target/generated-sources/annotations.
Interestingly, manually editing the file that cannot be found within STS resolves the issue temporarily, but the application subsequently fails to locate another required file.
Our suspicion is that the build process triggered when starting the microservice from the Dashboard becomes corrupted, resulting in an inability to locate these files.
Once this error occurs it doesn't go away (recompiling refreshing , maven update, restart of STS, whatever doesnt work), but strangely, executing the following command via the command line:
mvn spring-boot:run
Allows the microservice to start successfully. Upon stopping the service and returning to STS, starting the microservice from the Dashboard works flawlessly. It appears that executing the command via the command line initiates a process that somehow rectifies the issue.
It's worth noting that occasionally, instead of the previously mentioned error, we encounter the following:
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'my.uri' in value "${my.uri}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:180) ~[spring-core-6.0.15.jar:6.0.15]
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) ~[spring-core-6.0.15.jar:6.0.15]
This error suggests an inability to locate the application.properties file. Again it looks like the build cannot locate some files
Please be aware that this issue began occurring with the 4.21.0 version of STS, as we had no such problems with version 4.15.0.
Unfortunately I cannot provide the steps to reproduce this.
I hope what I described makes sense to you.
Thank you so much for your work!