我有一个 Spring 启动应用程序。我正在尝试从 Swagger 2 切换到 OpenAPI v3。早些时候,我依赖于https://github.com/kongchen/swagger-maven-plugin,它非常棒,用于支持 yaml/ 等工件的编译/构建时生成json。现在,由于 kongchen 存储库中不提供 openAPI v3 支持,我被迫转向https://github.com/springdoc/springdoc-openapi-maven-plugin。但是,这个“springdocs-openapi”插件依赖于要运行的服务器,因为它使用集成阶段。在许多 CI/CD 环境中,在构建阶段让服务器启动并运行实际上是不可行的。是否存在限制,为什么在编译阶段没有可用于构建 openAPI 规范的基于反射的选项?谁能帮我找到替代方案来解决这个问题?
我正在创建一个带有半透明状态栏的棒棒糖工具栏的应用程序,以使状态栏也着色.它与真正的财产一起工作得很好.
只是工具栏现在与状态栏重叠,看起来很乱.将工具栏置于状态栏下方并保持窗口半透明状态的选项有哪些?
代码片段:
<style name="Theme.XXX" parent="Theme.AppCompat">
<item name="colorPrimary">...</item>
<item name="colorPrimaryDark">...</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="windowActionBar">false</item>
<item name="colorAccent">...</item>
</style>
Run Code Online (Sandbox Code Playgroud)
活动中使用的工具栏代码:
<android.support.v7.widget.Toolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/XXX"
android:elevation="5dp"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Theme.XXX" />
Run Code Online (Sandbox Code Playgroud)
提前致谢.