Size: a a a

Spring Framework and more

2020 February 12

VS

Vitaly Sirotkin in Spring Framework and more
Ruslan Stelmachenko
только не /static, а /styles
да, точно
источник

AK

Artyom Krikheli in Spring Framework and more
Всем добрый день! Появилась необходимость установить максимальное время обработки входного HTTP-запроса на контроллере. Используем Spring Boot, в качестве сервера - Tomcat. Пробовали настройки server.tomcat.connection-timeout/server.connection-timeout (в зависимости от версии спринга) - безрезультатно.
источник

AK

Artyom Krikheli in Spring Framework and more
Цель - отстрелить 500ку, если метод контроллера выполняется больше определенного количества времени ( подразумевается, что в какой-то момент поток томката будет на wait'е).
источник

Д

Дмитрий in Spring Framework and more
Artyom Krikheli
Цель - отстрелить 500ку, если метод контроллера выполняется больше определенного количества времени ( подразумевается, что в какой-то момент поток томката будет на wait'е).
т.е. вы хотите просто разорвать коннекшн в случае таймаута?
источник

AK

Artyom Krikheli in Spring Framework and more
да, именно, но на стороне сервера
источник

Д

Дмитрий in Spring Framework and more
ну это програмно надо делать, server.tomcat.connection-timeout это о другом
источник

AK

Artyom Krikheli in Spring Framework and more
Дмитрий
ну это програмно надо делать, server.tomcat.connection-timeout это о другом
мы думали насчет реализации через фильтры
источник

VS

Vitaly Sirotkin in Spring Framework and more
Artyom Krikheli
Всем добрый день! Появилась необходимость установить максимальное время обработки входного HTTP-запроса на контроллере. Используем Spring Boot, в качестве сервера - Tomcat. Пробовали настройки server.tomcat.connection-timeout/server.connection-timeout (в зависимости от версии спринга) - безрезультатно.
If JK aborts waiting for a response, because a reply timeout fired, there is no way to stop processing on the backend. Although you free processing resources in your web server, the request will continue to run on the backend - without any way to send back a result once the reply timeout fired.

So Tomcat will detect that the servlet has not responded within the timeout and will send back a response to the user, but will not stop the thread running. I don't think you can achieve what you want to do.
источник

Д

Дмитрий in Spring Framework and more
Artyom Krikheli
мы думали насчет реализации через фильтры
я бы просто через CompletableFuture делал в тупую, но там тоже после таймаута поток вроде не стопается а продолжает работать
источник

AK

Artyom Krikheli in Spring Framework and more
ну тогда можно и через @Async спринговый
источник

AK

Artyom Krikheli in Spring Framework and more
вроде в качестве общего решения неплохой вариант такой: https://brightinventions.pl/blog/spring-mvc-request-timeout/
источник

ĐV

Đạt Vũ in Spring Framework and more
hi everyone
источник

ĐV

Đạt Vũ in Spring Framework and more
can somebody tell me? what is the best way to compare 2 objects has same data type?  and get difference from them ? (field and value)
источник

ĐV

Đạt Vũ in Spring Framework and more
the object can be has nested another object and has a lot of field
источник

ch

central hardware in Spring Framework and more
Đạt Vũ
the object can be has nested another object and has a lot of field
equal() method
источник

QQ

Qqq Qqq in Spring Framework and more
suspend функции ломают генерацию ключей. int аргумент превращается в Object
источник

ĐV

Đạt Vũ in Spring Framework and more
central hardware
equal() method
you mean is  loop  each of field and compares them
источник

RK

Roman K in Spring Framework and more
You just need to know that those two are different?
источник

RK

Roman K in Spring Framework and more
Or you need full set of different fields including referenced ones?
источник

РН

Роман Нагаев in Spring Framework and more
Đạt Vũ
the object can be has nested another object and has a lot of field
i was given an advice to use structural pattern matching

but i don't know how to use it properly, so you have to google for it yourself
источник