當前位置: 首頁>>代碼示例>>Java>>正文


Java ServletRegistrationBean.addUrlMappings方法代碼示例

本文整理匯總了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;
}
 
開發者ID:Arquisoft,項目名稱:Voting_2b,代碼行數:8,代碼來源:WebConfiguration.java

示例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;
}
 
開發者ID:Manfred73,項目名稱:graphite-monitor-example,代碼行數:8,代碼來源:WebConfiguration.java

示例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;
}
 
開發者ID:uc-bd2k,項目名稱:Pilincs,代碼行數:8,代碼來源:Application.java

示例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;
}
 
開發者ID:CODINGSAINT,項目名稱:OAuthSpringSSO,代碼行數:8,代碼來源:H2Configuration.java

示例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;
}
 
開發者ID:zandrei,項目名稱:hibernate-envers-demo,代碼行數:13,代碼來源:Application.java

示例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;
}
 
開發者ID:yanaga-samples,項目名稱:academico,代碼行數:10,代碼來源:WebflowConfig.java

示例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;
}
 
開發者ID:azeckoski,項目名稱:lti_starter,代碼行數:11,代碼來源:Application.java

示例8: dispatcherRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration() {
    ServletRegistrationBean registration = new ServletRegistrationBean(new Proxy());
    registration.addUrlMappings("/*");

    return registration;
}
 
開發者ID:groupon,項目名稱:odo,代碼行數:8,代碼來源:GenericTestProxyContainer.java

示例9: dispatcherRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration() {
    ServletRegistrationBean registration = new ServletRegistrationBean(new TestHandler());
    registration.addUrlMappings("/*");

    return registration;
}
 
開發者ID:groupon,項目名稱:odo,代碼行數:8,代碼來源:GenericTestProxyContainer.java

示例10: h2servletRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
ServletRegistrationBean h2servletRegistration(){
    ServletRegistrationBean registrationBean = new ServletRegistrationBean( new WebServlet());
    registrationBean.addUrlMappings("/console/*");
    return registrationBean;
}
 
開發者ID:tiaoling,項目名稱:high,代碼行數:7,代碼來源:H2WebConfiguration.java

示例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;
}
 
開發者ID:tinywind,項目名稱:video-streaming-service,代碼行數:7,代碼來源:DbAuthConfig.java

示例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;
}
 
開發者ID:create1st,項目名稱:spring-batch,代碼行數:7,代碼來源:WebConfiguration.java

示例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;
}
 
開發者ID:garbagetown,項目名稱:springboot-tourreservation,代碼行數:7,代碼來源:Config.java

示例14: dispatcherRegistration

import org.springframework.boot.context.embedded.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean dispatcherRegistration() {
    ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet());
    registration.addUrlMappings("/services/*");
    return registration;
}
 
開發者ID:fteychene,項目名稱:gradlejug,代碼行數:7,代碼來源:Application.java


注:本文中的org.springframework.boot.context.embedded.ServletRegistrationBean.addUrlMappings方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。