Я хочу добавить
<!-- GOOGLE FONT --> <link href='https://fonts.googleapis.com/css?family=Raleway:500' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Muli' rel='stylesheet' type='text/css'> <!-- MATERIAL ICON FONT --> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
на странице Thymeleaf как:
<!-- GOOGLE FONT --> <link th:href="@{https://fonts.googleapis.com/css(family=Raleway:500)}" rel='stylesheet' type='text/css'> <link th:href="@{https://fonts.googleapis.com/css(family=Muli)}" rel='stylesheet' type='text/css'> <!-- MATERIAL ICON FONT --> <link th:href="@{https://fonts.googleapis.com/icon(family=Material+Icons)}" rel="stylesheet">
Я получаю эту ошибку:
An error happened during template parsing (template: "class path resource [templates/home.html]") org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/home.html]") ... 280 more Caused by: org.attoparser.ParseException: Could not parse as expression: "@{https://fonts.googleapis.com/css(family=Raleway:500)}" (template: "fragments/head" - line 16, col 11) at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393) at org.attoparser.MarkupParser.parse(MarkupParser.java:257) at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230) ... 85 more Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "@{https://fonts.googleapis.com/css(family=Raleway:500)}" (template: "fragments/head" - line 16, col 11) at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:131) ... 170 more
Я не могу понять Как указать https://fonts.googleapis.com/css?family=Raleway:500 и https://fonts.googleapis.com/icon?family=Material+Icons, я почти уверен, что знаки : и + вызывают проблемы.
https://fonts.googleapis.com/css?family=Raleway:500
https://fonts.googleapis.com/icon?family=Material+Icons
:
+