springboot combined jsp page Comments

The first blog, in fact, in order to constrain myself, not necessarily to write, learn from each other it! There is something wrong, please correct me, thank you!

Today we look at springboot combined with the specific operation jsp page;

1, we first look at the directory structure

From the above we can see that the use of jsp page, the first step you need to manually create the folder webapp -> WEB-INF -> jsp, the .jsp page into the directory, should be noted that, webapp will need to file folder processed, otherwise it is impossible to create a jsp page, as shown below:

Painting a bit messy, I understand that to mean webapp a label, let people know what he is doing;

The second step is dependent pom, using jsp page requires the following two dependencies;

The third step is the introduction of static resources such as css, js, images, etc., it must be placed in the static directory under the resources directory, see below;

When this page is accessed you will be able to find a static resource, as the following templates files are used to store html page;

The fourth step, you can now use jsp page, but still be a long-winded mouth, because the page under the WEB-INF directory can not be accessed directly, using the controller needs to be forwarded controller can!

Understand quite superficial, if you feel not write, do not spray!

Guess you like

Origin www.cnblogs.com/cayf/p/12090709.html