我写了一些使用一些resteasy库的代码。
该代码在 Eclipse 中运行良好,但在使用 maven shade 插件作为 fat-jar 构建执行时会产生异常。
原因:在 META-INF/services/javax.ws.rs.ext.Providers 下创建的 jar 中,只列出了来自 resteasy-client 的提供者。然而,我还需要来自 resteasy-jackson2-provider 和来自 resteasy-jaxrs 的提供者。
我认为问题可能是,所有 3 个库(resteasy-client、resteasy-jackson2-provider、resteasy-jaxrs)都使用同名文件来列出它们的提供者(META-INF/services/javax.ws.rs.ext.供应商)。因此,也许 maven 会用其他库中的列表覆盖一个库中的提供者列表?
我的 pom.xml 看起来像这样:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.6.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.6.1.Final</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>playarounds.ServiceMainClass</Main-Class>
</manifestEntries> …Run Code Online (Sandbox Code Playgroud) 我在 iframe 中使用 keycloak。在我的钥匙斗篷后面是一些二级 IDP,例如 google 和 facebook。
根据我当前的配置,keycloak 只是重定向到那些辅助 IDP。这意味着它们也在 iframe 中打开。我真的很想改变这一点,因为它与我的一些主要安全政策相矛盾。
我可以以某种方式告诉 keycloak 在弹出窗口中打开外部 IDP 吗?我已阅读 keycloak“服务器管理指南”,但找不到任何有关此问题的信息。