Spring Boot + Swagger + custom swagger-ui.html

后端 未结 2 1265
情书的邮戳
情书的邮戳 2021-02-19 22:11

I\'ve got problems migrating a war application to a spring boot jar application.

I\'m using spring boot 1.4.1 and swagger 2.6.0.

To customize swagger ui in a war

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-19 22:26

    Solution if you are using maven:

    • You should copy swagger-ui.html into src/main/webapp

    • Make your editions or replace screen.css by your theme.css

    Than add these code into your pom.xml:

    
        
            
                org.apache.maven.plugins
                maven-war-plugin
                
                    
                        
                            ${basedir}/src/main/webapp
                            true
                            
                                *.css
                                *.html
                            
                        
                    
                
            
        
    
    

提交回复
热议问题