我试图建立一个jar,可以执行简单的keycloak配置。我使用keycloak-admin-client和最新的keycloak版本22.0.5。然而,在尝试了dependecies甚至quarkus-keycloak-admin-client的许多不同选项后。我经常卡住;
Exception in thread "main" jakarta.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: jakarta.ws.rs.ProcessingException: RESTEASY003215: could not find writer for content-type application/x-www-form-urlencoded type: jakarta.ws.rs.core.Form$1
字符串
我知道spring 2 > 3也有一些javax到jaknovel的迁移问题,但在这方面我没有办法解决这个问题。我正在寻找的这个作家是什么,我是否正确地理解了它在Form的构造函数中出错?
public Form(MultivaluedMap<String, String> store) {
this.parameters = store;
}
型
java版本是openjdk 17.0.9 LTS,我运行的命令只是mvn clean package和java -jar jarfile。
<parent>
<groupId>config.keycloak</groupId>
<artifactId>keycloak-config-tryout</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>java-configuration</artifactId>
<properties>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<resteasy.version>6.2.6.Final</resteasy.version>
<keycloak.version>22.0.5</keycloak.version>
<maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
<lombok.version>1.18.26</lombok.version>
</properties>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId>
<version>${keycloak.version}</version>
</dependency>
<!--Tooling-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>config.keycloak.KeycloakConfigurationApplication</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/javax.ws.rs.ext.Providers</resource>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<outputFile>${project.build.directory}/${project.artifactId}.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
型
1条答案
按热度按时间p5fdfcr11#
你有没有试着从
字符串
到
型
在resteasy-client和resteasy-jackson 2-provider中,这两个文件都从
javax.ws.rs.ext.Providers
重命名为jakarta.ws.rs.ext.Providers
请参见resteasy-client的here和resteasy-jackson 2-provider的here