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

Support "-parameters" java compiler arg in vscode-tools #3

Open
bclozel opened this issue Jun 11, 2024 · 2 comments
Open

Support "-parameters" java compiler arg in vscode-tools #3

bclozel opened this issue Jun 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bclozel
Copy link

bclozel commented Jun 11, 2024

As of Spring Framework 6.1, Spring applications now need to be compiled with the "-parameters" Java compiler argument. This is now required for many Spring features - most annotation-based programming models in Spring need to read the names of method parameters.

For example, this Spring MVC controller will not work anymore if this compiler argument is not set:

@RestController
public class TestController {

  @GetMapping("/user/{id}")
  public User findUser(@PathVariable Long id) {
    //...
  }

}

Many guides on Spring academy will work when run with ./gradlew bootRun but won't if the user runs the application from VSCode. I've found that this compiler argument can be turned on by adding a JDT compiler configuration file.

Could you update the VSCode image to include this by default?

@bclozel
Copy link
Author

bclozel commented Jun 11, 2024

Pinging @robertmcnees on this issue since we encountered this problem while working on the Spring for GraphQL guide for Spring Academy.

@billkable
Copy link
Contributor

Thanks @bclozel we should be able to overlay the necessary configuration into the Academies editor configuration. We'll give a go and report back here.

@billkable billkable self-assigned this Jun 11, 2024
@billkable billkable added the bug Something isn't working label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants