public interface MyHttpService { void handleRequest(HttpServletRequest request, HttpServletResponse response); } public class MyHttpServiceImpl implements MyHttpService { @Override public void handleRequest(HttpServletRequest request, HttpServletResponse response) { } } <scr:component xmlns="http://www.osgi.org/xmlns/scr/v1.1.0" name="MyHTTPService" immediate="true"> <implementation class="com.example.MyHttpServiceImpl"/> <service> <provide interface="com.example.MyHttpService"/> </service> </scr:component>


上一篇:
下一篇:
切换中文