Мне нужно получить данные из модели атрибутов jQuery, но в консоли возникает ошибка ERR_INCOMPLETE_CHUNKED_ENCODING
.
Журнал ошибок консоли Spring:
com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields (BeanSerializerBase.java:719) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize (BeanSerializer.java:155) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serializeContents (CollectionSerializer.java:145) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize (CollectionSerializer.java:107) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize (CollectionSerializer.java:25) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField (BeanPropertyWriter.java:727) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields (BeanSerializerBase.java:719) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize (BeanSerializer.java:155) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField (BeanPropertyWriter.java:727) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields (BeanSerializerBase.java:719) ~ [jackson-databind-2.9.6.jar: 2.9.6]
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize (BeanSerializer.java:155) ~ [jackson-databind-2.9.6.jar: 2.9.6]
Контроллер
List<Species> species = speciesRepository.findAll();
model.addAttribute("species", species);
Javascript
<script type="text/javascript" th:inline="javascript">
/*<![CDATA[*/
var species = /*[[${species}]]*/ ;
/*]]>*/
console.log(species);
Может быть, кто-то может помочь решить эту проблему