Изменение внутренних алгоритмов построения плейлиста
Теперь генерируется вначале обобщенный KinoPlay объект, сочетающий в себе все прелести обычного фильма, сериала и сезонных сериалов. Из недоделок, сейчас коряво работает возобновение просмотра.
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
*/
|
||||
package kinosearch.webapp;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import kinosearch.core.KinoPlay;
|
||||
import kinosearch.core.SpringConfig;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.context.annotation.*;
|
||||
import org.springframework.web.servlet.ViewResolver;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
@@ -36,6 +36,12 @@ public class WebAppConfiguration extends WebMvcConfigurerAdapter {
|
||||
return freeMarkerConfigurer;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Scope("singleton")
|
||||
public Gson gson() {
|
||||
return new GsonBuilder().registerTypeAdapter(KinoPlay.class, new KinoPlaySerializer()).create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/css/**")
|
||||
|
||||
Reference in New Issue
Block a user