0%
Setup and First Project

Setup

From the generated skeleton to the first page served.

15-20 min

Setup and First Project

A generation ago, starting a Java web project took a full day: choosing a servlet container, installing it, writing a web.xml, declaring the DispatcherServlet, creating one dispatcher-servlet.xml for the web context and another for the root context, configuring a view resolver, packaging a .war, dropping it into a server, restarting. Every mistake in any of these files showed up at server startup as a two-hundred-line stack trace.

That time wasn't design time. It was plumbing time, redone identically on every project. And because it was redone by hand, each project ended up with slightly different settings (an encoding here, a view prefix there) that nobody owned, since nobody had actually decided them.

Spring Boot removes this step by inverting the approach: instead of asking you to declare everything, it infers the configuration from the dependencies present in your project. A template library on the classpath, and the matching view resolver is registered. A database driver, and a data source is built. You only configure the deviations from the defaults.

Comments

Comments are powered by GitHub Discussions

Sign in with GitHub to join the discussion

Link copied!