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

When I use Spring Framework 6.x, I can mix up packaging normally, but the controller reports an error after running it #397

Open
xiaobaogeit opened this issue Apr 10, 2024 · 1 comment

Comments

@xiaobaogeit
Copy link

xiaobaogeit commented Apr 10, 2024

use:

<plugin>
    <groupId>com.github.wvengen</groupId>
    <artifactId>proguard-maven-plugin</artifactId>
    <version>2.6.1</version>
    ...
<plugin>

error:

Name for argument of type [java.lang.String] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.

Spring prompts for use:
https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <parameters>true</parameters>
    </configuration>
</plugin>
@xiaobaogeit xiaobaogeit changed the title When I use Spring Framework 6. x, I can mix up packaging normally, but the controller reports an error after running it When I use Spring Framework 6.x, I can mix up packaging normally, but the controller reports an error after running it Apr 10, 2024
@clloydaccanto
Copy link

I had a similar problem after upgrading SpringBoot (to 3.3). For me I needed to add -keepattributes MethodParameters to my proguard config in combination with the compiler '-parameters' flag seems to get it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants