After creating the basic hello world Spring Java application I am getting this lint error for the 'hello' package definition:
The declared package "hello" does not match the expected package "main.java.hello"
I understand in Eclipse you can change the Java source directory to be /src/main/java instead of just /src. How can I achieve the same in VSCode?
You can right-click on src/main/java in Explorer and choose "Add Folder to Java Source Path", and restart VSCode.
In the .vscode/settings file set
"java.project.sourcePaths": [
"src/main/java"
]
or edit the Workspace settings and find the java.sourcePaths property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With