@ Bean public ArmeriaServerConfigurator armeriaTomcat ( ) { WebServer webServer = ( ( WebServerApplicationContext ) applicationContext ) . getWebServer ( ) ; if ( webServer instanceof TomcatWebServer ) { Tomcat tomcat = ( ( TomcatWebServer ) webServer ) . getTomcat ( ) ; return serverBuilder -> serverBuilder . service ( "prefix:/tomcat/api/rest/v1" , TomcatService . forTomcat ( tomcat ) ) ; } return serverBuilder -> { } ; }
Bean to configure Armeria Tomcat service .