1. 程式人生 > >spring-boot開發:使用內嵌容器進行快速開發及測試

spring-boot開發:使用內嵌容器進行快速開發及測試

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::            (v1.0.0.RC1)

2016-05-31 09:37:16.157  INFO 4268 --- [           main] cn.eguid.TestController                  : Starting TestController on wang-pc with PID 4268 (D:\eguid\Workspaces\MyEclipse2015\springBootTest\target\classes started by wangliang)
2016-05-31 09:37:16.329  INFO 4268 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot
[email protected]
3d04562f: startup date [Tue May 31 09:37:16 CST 2016]; root of context hierarchy 2016-05-31 09:37:17.673 INFO 4268 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]] 2016-05-31 09:37:19.533 INFO 4268 --- [ main] .t.TomcatEmbeddedServletContainerFactory : Server initialized with port: 8080 2016-05-31 09:37:19.921 INFO 4268 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat 2016-05-31 09:37:19.921 INFO 4268 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/7.0.47 2016-05-31 09:37:20.155 INFO 4268 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2016-05-31 09:37:20.155 INFO 4268 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3826 ms 2016-05-31 09:37:21.718 INFO 4268 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2016-05-31 09:37:21.824 INFO 4268 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String cn.eguid.TestController.hello() 2016-05-31 09:37:21.824 INFO 4268 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.boot.actuate.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2016-05-31 09:37:21.839 INFO 4268 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[text/html],custom=[]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.actuate.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest) 2016-05-31 09:37:21.855 INFO 4268 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2016-05-31 09:37:21.855 INFO 4268 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2016-05-31 09:37:22.277 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Registering beans for JMX exposure on startup 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/shutdown],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String) 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String) 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0 2016-05-31 09:37:22.371 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'environmentEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=environmentEndpoint] 2016-05-31 09:37:22.418 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'healthEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=healthEndpoint] 2016-05-31 09:37:22.418 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'beansEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=beansEndpoint] 2016-05-31 09:37:22.433 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'infoEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=infoEndpoint] 2016-05-31 09:37:22.433 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'metricsEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=metricsEndpoint] 2016-05-31 09:37:22.449 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'traceEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=traceEndpoint] 2016-05-31 09:37:22.449 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'dumpEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=dumpEndpoint] 2016-05-31 09:37:22.464 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'autoConfigurationAuditEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=autoConfigurationAuditEndpoint] 2016-05-31 09:37:22.464 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'shutdownEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=shutdownEndpoint] 2016-05-31 09:37:22.480 INFO 4268 --- [ main] o.s.b.a.e.jmx.EndpointMBeanExporter : Located managed bean 'configurationPropertiesReportEndpoint': registering with JMX server as MBean [org.springframework.boot:type=Endpoint,name=configurationPropertiesReportEndpoint] 2016-05-31 09:37:22.558 INFO 4268 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port: 8080 2016-05-31 09:37:22.558 INFO 4268 --- [ main] cn.eguid.TestController : Started TestController in 7.833 seconds (JVM running for 9.301)


相關推薦

spring-boot開發使用容器進行快速開發測試

. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_|

VELT-0.1.5開發在VS2013下進行python開發

快樂蝦歡迎轉載,但請保留作者資訊本文僅適用於vs2013 + velt-0.1.5VELT的全稱是Visual EmbedLinuxTools,它是一個visual studio外掛,用以輔助完成Lin

Android開發 使用WebView來進行混合開發

Web2Native 方法的使用 WebView使用本地的方法,直接使用是不行的,需要本地進行方法的配置。 1.WebView設定這兩句條碼 // 允許執行JavaScript指令碼 webSettings.setJavaScriptEnable

Spring Boot 微服務之間通過FeignClient進行大檔案下載

使用FeignClient作為中介軟體進行一個微服務之間的呼叫的時候,一般的服務請求是沒有什麼問題,但是,當下載大檔案,會出現:java heap space 也就是堆溢位問題。 具體解決方案如下: 1、首先是service層返回ResponseEntit

Spring Boot(三)AOP&日誌操作&異常處理

-1 aop str image pan handle ssa upload java代碼 一、AOP:HttpAspect.java 二、操作日誌 在HttpAspect.java中調用org.slf4j.Logger、org.slf4j.LoggerFactor

[小程序開發] 微信小程序網頁web-view開發教程

工具 內容 不支持 clas .html bind har 開發 style 為了便於開發者靈活配置小程序,微信小程序開放了內嵌網頁能力。這意味著小程序的內容不再局限於pages和large,我們可以借助內嵌網頁豐富小程序的內容。下面附上詳細的開發教程(含視頻操作以及註意事

《01.Spring Boot連載Spring Boot入門介紹》

spring boot maven 1 Spring Boot的概述Spring Boot是開發者和Spring 本身框架的中間層,幫助開發者統籌管理應用的配置,提供基於實際開發中常見配置的默認處理(即習慣優於配置),簡化應用的開發,簡化應用的運維;總的來說,其目的Spring Boot就是為了對Ja

Spring Boot實戰攔截器與過濾器

www container extends post 代理 init 切面 請求 一個 一、攔截器與過濾器   在講Spring boot之前,我們先了解一下過濾器和攔截器。這兩者在功能方面很類似,但是在具體技術實現方面,差距還是比較大的。在分析兩者的區別之前,

Spring Boot(3)加載DataSource過程的源碼分析yml中DataSource的配置

conf apache JD asi 其中 ase providers ram nconf Spring Boot實現了自動加載DataSource及相關配置。當然,使用時加上@EnableAutoConfiguration註解是必須的。下面就是對這一部分的源碼分析。 (1

Spring Cloud Spring Boot mybatis分布式微服務雲架構-開發Web應用2

Spring Cloud Spring Boot 微服務 mybatis 在完成配置之後,舉一個簡單的例子,在快速入門工程的基礎上,舉一個簡單的示例來通過Thymeleaf渲染一個頁面 @Controller public class HelloController { @R

Spring Cloud Spring Boot mybatis分布式微服務雲架構-開發Web應用

Spring Cloud Spring Boot 架構 靜態資源訪問 在我們開發Web應用的時候,需要引用大量的js、css、圖片等靜態資源。 默認配置 Spring Boot默認提供靜態資源目錄位置需置於classpath下,目錄名需符合如下規則: /static/public/resource

Spring boot基礎配置文件配置變量

logback 引用 boot private prop 問題 測試環境 打包 dev 一、配置   resources下面application.properties 1、普通配置   resources下面application.properties,比如寫上:serv

Spring Boot 使用IntelliJ IDEA創建一個web開發實例(一)

14. init 分享 nbsp 新建項目 tell initial 技術 ini .新建項目File-->New-->Project-->Spring Initializr 點擊Finish,一個Spring Boot web應用就創建好

Spring Boot 使用IntelliJ IDEA創建一個web開發實例(二)

reat TP idea debug str mage 地址 eat ica 1. 創建一個Controller類 package com.example.demo; import org.springframework.web.bind.annotation.Req

Spring Boot 使用IntelliJ IDEA創建一個web開發實例(三)

let 文件 boot mage contex img yml web訪問 cati 屬性配置 1.配置application.properties文件 配置web訪問端口和context path server.port = 8081 server.servlet.c

spring boot: GlobalDefaultExceptionHandler方法的友好錯誤提示,全局異常捕獲

clas urn ice servlet 提示 ram oca release format spring boot: GlobalDefaultExceptionHandler方法內的友好錯誤提示,全局異常捕獲 當你的某個控制器內的某個方法報錯,基本上回顯示出java錯誤

Spring boot 之 使用JPA對數據進行復雜條件的查詢

自定義 exec ica ima dao one font 實現 tro 1、多條件的精確查詢 需要在Dao層自定義sql語句查詢(如下圖,這裏方法名自定義) 2、多條件的復雜查詢 首先需要Dao層繼承 JpaSpecificationExecutor(

Spring Boot(1) 快速入門

標準 版本號 odi enable 部署 tro 依賴包 -m xsd Spring Boot 簡介 Spring Boot非常簡單易用,我們只需要很少的配置,就可以使用Spring Boot快速的搭建基於Spring的生產級程序。Spring Boot提供了一種特殊的方式

Spring Boot 項目在 IDEA 中 進行單元測試

res sin run ng- targe clas 單元測試 2.0 就會 Spring Boot提供了許多實用程序和註釋來幫助您測試應用程序。 測試由兩個模塊提供支持:spring-boot-test包含核心項,spring-boot-test-autoconfigur

《零基礎入門學習Python》(20)--函式函式和閉包

前言 之前我們講了函式的一些相關知識,瞭解了什麼是全域性變數什麼是區域性變數,接下來我們看看怎麼將區域性變數變為全域性變數。還要將將內嵌函式的相關概念 知識點 global關鍵字  使用global關鍵字,可以修改全域性變數: >>> count