25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 1 ■ Your First <strong>Spring</strong> Application<br />

You should have the following output after executing the gradle command:<br />

isf-book$ gradle run -DmainClass=com.apress.isf.spring.HelloWorldController<br />

:ch01:compileJava UP-TO-DATE<br />

:ch01:compileGroovy UP-TO-DATE<br />

:ch01:processResources UP-TO-DATE<br />

:ch01:classes UP-TO-DATE<br />

:ch01:run<br />

:: <strong>Spring</strong> Boot :: (v1.0.2.RELEASE)<br />

INFO 84872 --- [main] .t.TomcatEmbeddedServletContainerFactory : Server initialized with port: 8080<br />

INFO 84872 --- [main] o.apache.catalina.core.StandardService : Starting service Tomcat<br />

INFO 84872 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache<br />

Tomcat/7.0.52<br />

INFO 84872 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing <strong>Spring</strong><br />

embedded WebApplicationContext<br />

INFO 84872 --- [ost-startStop-1] o.s.web.context.ContextLoader<br />

: Root<br />

WebApplicationContext: initialization completed in 2030 ms<br />

INFO 84872 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080/http<br />

INFO 84872 --- [main] c.a.isf.spring.HelloWorldController : Started HelloWorldController in<br />

7.086 seconds (JVM running for 7.599)<br />

> Building 80% > :ch01:run<br />

Now you can go to any browser and type in the URL http://localhost:8080 (see Figure 1-3).<br />

Figure 1-3. <strong>Spring</strong> Boot Web Page<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!