Answer the question
In order to leave comments, you need to log in
How to properly avoid duplicate view code?
In spring mvc, I call the view and each time I describe the page again, given that the footer and header of the site are the same, tell me how to make it more convenient, for example, in php it was something like this:
Generic template.php file
--- the header is written
<?= $content ?>
-- the footer is written
How to make similar but only on java springmvc?
Answer the question
In order to leave comments, you need to log in
Например, Thymeleaf умеет в подключение разных файлов в один как фрагментов.
Способов много. Если используете JSP, то можно, например, tag files
Тогда ваш код может выглядеть как-то так:
<my:page title="Title">
Content
</my:page>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question