use of io.servicecomb.transport.rest.servlet.RestServlet in project java-chassis by ServiceComb.
the class CseEmbeddedServlet method restServletRegistration.
@Bean
public ServletRegistrationBean restServletRegistration() {
String name = env.getProperty("cse.servlet.name");
name = name == null ? DEFAULT_SERVLET_NAME : name;
String url = env.getProperty("cse.servlet.url");
url = url == null ? DEFAULT_URL : url;
ServletRegistrationBean registrationBean = new ServletRegistrationBean(new RestServlet(), url);
registrationBean.setName(name);
return registrationBean;
}
Aggregations