Вставьте значения из сообщений.Html

Программисты Html
Ответить
Anonymous
 Вставьте значения из сообщений.

Сообщение Anonymous »

Это скрипт: < /p>

{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "[(${faq.question1})]",
"acceptedAnswer": {
"@type": "Answer",
"text": "[(${faq.answer1})]"
}
}]
}


и файл свойств Сообщения.faq.question1=What is Mystic Planets?
faq.answer1=Mystic Planets is an astrology app that helps users understand their birth chart and align with their purpose.

Но страница не загружается:

, когда я попробовал это:

Затем я получил эту ошибку: < /p>
2025-02-28 20:20:45.040 [http-nio-8080-exec-1] ERROR [] o.a.c.c.C.[.[.[.[dispatcherServlet]@log(175) - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "faq.question1" (template: "index-new" - line 404, col 32)] with root cause
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'question1' cannot be found on null
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:225)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:112)
at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorValueRef.getValue(PropertyOrFieldReference.java:376)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:97)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:116)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:338)
at org.thymeleaf.spring6.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:265)
at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166)
at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66)
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109)


Подробнее здесь: https://stackoverflow.com/questions/794 ... -thymeleaf
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Html»