Closed angeloimm closed 10 months ago
This looks similar to https://github.com/spring-projects/spring-boot/issues/38536#issuecomment-1825517872
Can you apply the recommendation and let us know if it fixed the problem? Thanks!
@bclozel thank you. I confirm that by adding the -parameter flag in maven compilation all works also with springboot 3.2.0 Thank you!
Thanks for letting us know!
You are welcome... sorry for bothering
Hello, My upgrade to springboot3.2.0 also encountered, but adding -parameters through maven is still not solved; I wonder if I added it by mistake. How did you add it?
@1065609785 this is what I inserted in my pom.xml and, more specifically, in my maven-compiler-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<generatedSourcesDirectory>target/generated-sources</generatedSourcesDirectory>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
@1065609785 this is what I inserted in my pom.xml and, more specifically, in my maven-compiler-plugin
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <compilerArgs> <arg>-parameters</arg> </compilerArgs> <showWarnings>true</showWarnings> <showDeprecation>true</showDeprecation> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> <generatedSourcesDirectory>target/generated-sources</generatedSourcesDirectory> <annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> </path> <path> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${org.mapstruct.version}</version> </path> </annotationProcessorPaths> </configuration> </plugin>
@1065609785这是我在 pom.xml 中插入的内容,更具体地说,在我的 maven-compiler-plugin 中插入的内容
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <compilerArgs> <arg>-parameters</arg> </compilerArgs> <showWarnings>true</showWarnings> <showDeprecation>true</showDeprecation> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> <generatedSourcesDirectory>target/generated-sources</generatedSourcesDirectory> <annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> </path> <path> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${org.mapstruct.version}</version> </path> </annotationProcessorPaths> </configuration> </plugin>
Thank you. I set it that way too, but it didn't work; I'm gonna check to see if there are any other Settings that are affecting this block
@1065609785 I am assuming you're not using spring-boot-starter-parent
. It's better to set the parameters
option of the plugin as the compilerArgs
could be overridden, see the framework release notes.
@snicoll This method is OK, I did not directly use the spring-boot-starter-parent; Thank you for your help.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
出现了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
Hi all
I had a working application based on springboot 3.1.x (actually both 3.1.5 and 3.1.6 work pretty good)
I upgraded to springboot 3.2.0. I had and I still have this controller method:
With springboot 3.1.5 and springboot 3.1.6 this method is working; from front end the called URL is .../all-pdc-con-utente?isLoggedAsAdmin=true and yoo can see that the request param is isLoggedAsAdmin. With springboot 3.2.0 I got this exception:
How should I solve the issue?