Tuesday, October 23, 2018

Spring Boot and JSF

Integrating Spring Boot and JSF is quite simple. For this purpose, we will use joinfaces. First, create maven pom.xml and set the parent and the dependencies as shown below.


Next, configure spring boot application. Create a new class and give @SpringBootApplication class annotation. Also create a main method where we will call spring boot application as
shown below.


Next, create a jsf html page and put it inside src/main/resources/META-INF/resources/ source folder. The folder structure and file content is shown below.



Run the App.java and make http request on browser. The following output will be displayed.


 

©2009 Stay the Same | by TNB