A CookieCutter for a standalone Spring Boot Web App with a Vaadin 8 UI.
Note
|
This project assumes you’re using Spring Tools Suite for development. It also assumes you have python and cookiecutter installed (pip install cookiecutter ).
|
cookiecutter https://github.com/William-Lake/Vaadin8_CookieCutter.git
-
If it’s not already, open Eclipse STS.
-
Right click in the Package Explorer and select "Import…"
-
Expand the 'Maven' node and select 'Existing Maven Projects'. Click Next >
-
In the upper right hand corner Click Browse… and navigate to/select your generated project’s directory. Click Select Folder.
-
Click Finish to import your project.
Note
|
If you opted not to generate the UI class you likely will get a "WhiteLabel Error Page", however you can still verify your project is running via the console output. |
-
In the Package Explorer, right click your project and select Run As › Spring Boot App
-
Your console will open and you should see output like the example below.
-
When you see the final line containing output similar to "
Started ExampleApp in 11.528 seconds (JVM running for 12.293)
" open a web browser and navigate tolocalhost:8080/
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.2.RELEASE)
2019-01-27 09:39:20.239 INFO 6187 --- [ main] c.l.e.ExampleApp : Starting ExampleApp on Computer with PID 6187 (started by wlake in /home/wlake/sts-workspace/ExampleApp)
2019-01-27 09:39:20.248 INFO 6187 --- [ main] c.l.e.ExampleApp : No active profile set, falling back to default profiles: default
2019-01-27 09:39:21.286 INFO 6187 --- [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'com.vaadin.spring.VaadinConfiguration' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2019-01-27 09:39:21.747 INFO 6187 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-01-27 09:39:21.783 INFO 6187 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-01-27 09:39:21.784 INFO 6187 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.14]
2019-01-27 09:39:21.791 INFO 6187 --- [ main] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
2019-01-27 09:39:21.886 INFO 6187 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-01-27 09:39:21.887 INFO 6187 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1589 ms
2019-01-27 09:39:21.899 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Registering Vaadin servlet
2019-01-27 09:39:21.900 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Servlet will be mapped to URLs [/vaadinServlet/*, /VAADIN/*]
2019-01-27 09:39:21.907 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Setting servlet init parameters
2019-01-27 09:39:21.907 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [productionMode] = [false]
2019-01-27 09:39:21.908 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [resourceCacheTime] = [3600]
2019-01-27 09:39:21.908 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [heartbeatInterval] = [300]
2019-01-27 09:39:21.908 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [closeIdleSessions] = [false]
2019-01-27 09:39:22.186 INFO 6187 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-01-27 09:39:22.359 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Checking the application context for Vaadin UI mappings
2019-01-27 09:39:22.365 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Registering Vaadin servlet of type [com.vaadin.spring.server.SpringVaadinServlet]
2019-01-27 09:39:22.367 INFO 6187 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Forwarding @SpringUI URLs from {/=org.springframework.web.servlet.mvc.ServletForwardingController@107bfcb2}
2019-01-27 09:39:22.510 INFO 6187 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-01-27 09:39:22.517 INFO 6187 --- [ main] c.l.e.ExampleApp : Started ExampleApp in 2.774 seconds (JVM running for 3.993)
2019-01-27 09:39:36.914 INFO 6187 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2019-01-27 09:39:36.915 INFO 6187 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2019-01-27 09:39:36.922 INFO 6187 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 7 ms