小编Sha*_*dra的帖子

Springfox swagger 在 spring boot 2.2.0 中不起作用

我想将 spring boot v2.1.9 升级到 2.2.0。但是升级后我得到了一些例外,它说 spring fox 使用的是旧版本的 spring-plugin-core。

有没有其他替代解决方案,或者我需要放弃 springfox 插件吗?

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    springfox.documentation.spring.web.plugins.DocumentationPluginsManager.createContextBuilder(DocumentationPluginsManager.java:152)

The following method did not exist:

    org.springframework.plugin.core.PluginRegistry.getPluginFor(Ljava/lang/Object;Lorg/springframework/plugin/core/Plugin;)Lorg/springframework/plugin/core/Plugin;

The method's class, org.springframework.plugin.core.PluginRegistry, is available from the following locations:

    jar:file:/C:/Users/regosa/.m2/repository/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar!/org/springframework/plugin/core/PluginRegistry.class

It was loaded from the following location:

    file:/C:/Users/regosa/.m2/repository/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, …
Run Code Online (Sandbox Code Playgroud)

spring spring-data-jpa spring-boot swagger-2.0 springfox

31
推荐指数
4
解决办法
3万
查看次数

按键(日期,字符串)对地图排序

Map<XMLGregorianCalendar, String> SortedByTimeForJourney = new HashMap<XMLGregorianCalendar, String>();
Run Code Online (Sandbox Code Playgroud)

我必须按键(XMLGregorianCalendar)对其进行排序。我试过了

 SortedByTimeForJourney.entrySet().stream().sorted(Map.Entry.<XMLGregorianCalendar, String>comparingByKey()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2, LinkedHashMap::new));
Run Code Online (Sandbox Code Playgroud)

但它显示类型参数'javax.xml.datatype.XMLGregorianCalendar'的边界不完整;应该实现'java.lang.Comparable'

我也尝试通过将其保存在LinkedHashMap中并使用Collections.util方法来执行此操作,但是无法执行。

有人请帮助我。

java sorting maven

4
推荐指数
1
解决办法
80
查看次数