本文整理匯總了Java中org.springframework.boot.context.embedded.ServletRegistrationBean.addUrlMappings方法的典型用法代碼示例。如果您正苦於以下問題:Java ServletRegistrationBean.addUrlMappings方法的具體用法?Java ServletRegistrationBean.addUrlMappings怎麽用?Java ServletRegistrationBean.addUrlMappings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.boot.context.embedded.ServletRegistrationBean
的用法示例。
在下文中一共展示了ServletRegistrationBean.addUrlMappings方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
ServletRegistrationBean h2servletRegistration()
{
ServletRegistrationBean registrationBean = new ServletRegistrationBean( new WebServlet());
registrationBean.addUrlMappings("/console/*");
return registrationBean;
}
示例2: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*");
registration.addInitParameter("webAllowOthers", "true");
return registration;
}
示例3: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
@Profile("default")
public ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*");
return registration;
}
示例4: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean h2servletRegistration() {
WebServlet webServlet = new WebServlet();
ServletRegistrationBean bean = new ServletRegistrationBean(webServlet);
bean.addUrlMappings("/h2console/*");
return bean;
}
示例5: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
/**
* Register bean to be able to access H2 database administration console
* with the url http://localhost:8080/console
*
* @return a {@link ServletRegistrationBean}
*/
@Bean
public ServletRegistrationBean h2servletRegistration() {
final ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*");
return registration;
}
示例6: webflowServlet
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean webflowServlet() {
ServletRegistrationBean registration = new ServletRegistrationBean();
registration.setServlet(new DispatcherServlet(new AnnotationConfigWebApplicationContext()));
registration.addUrlMappings("/spring/*");
registration.setLoadOnStartup(1);
registration.setName("webflowServlet");
return registration;
}
示例7: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
/**
* Allows access to the H2 console at: {server}/console/
* Enter this as the JDBC URL: jdbc:h2:mem:AZ
*/
@Bean
public ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*");
return registration;
}
示例8: dispatcherRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new Proxy());
registration.addUrlMappings("/*");
return registration;
}
示例9: dispatcherRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new TestHandler());
registration.addUrlMappings("/*");
return registration;
}
示例10: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
ServletRegistrationBean h2servletRegistration(){
ServletRegistrationBean registrationBean = new ServletRegistrationBean( new WebServlet());
registrationBean.addUrlMappings("/console/*");
return registrationBean;
}
示例11: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*");
return registration;
}
示例12: h2servletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean h2servletRegistration() {
final ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings(h2ConsoleMappings());
return registration;
}
示例13: h2ServletRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean h2ServletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/console/*");
return registration;
}
示例14: dispatcherRegistration
import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet());
registration.addUrlMappings("/services/*");
return registration;
}