@Bean(name = "commonsMultipartResolver")
public MultipartResolver multipartResolver() {
return new StandardServletMultipartResolver();
}
@Bean
public MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
factory.setMaxFileSize("10MB");
factory.setMaxRequestSize("10MB");
return factory.createMultipartConfig();
}
let count = 0
let obs = Observable.create(s=>{
setInterval(()=>{
s.next(count++)
// s.complete()
},2000)
}).publishReplay()
obs.connect()//Без этого не работает
obs.subscribe(
v=>console.log(`A: ${v}`)
)
setTimeout(()=>{
obs.subscribe(
v=>console.log(`B: ${v}`)
)
},10000)