再次,似乎应该很容易覆盖搜索窗口小部件的弹出窗口。我试图实现一个简单的覆盖,只是为了确保它可以工作,但不能。搜索有效,但弹出窗口继续使用默认值:
import java.util.HashMap;
import java.util.Map;
import javax.servlet.FilterRegistration;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.hibernate5.support.OpenSessionInViewFilter;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.DispatcherServlet;
@Configuration
public class AppInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext container) throws ServletException {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
context.scan("org.robin.test");
// container.se
container.addListener(new ContextLoaderListener(context));
ServletRegistration.Dynamic dispatcher = container.addServlet("robinTest", new DispatcherServlet(context));
dispatcher.setLoadOnStartup(2);
dispatcher.addMapping("/simple/");
dispatcher.addMapping("/secureServices/");
FilterRegistration.Dynamic filter = container.addFilter("robinTestFilter", DelegatingFilterProxy.class);
filter.setInitParameter("targetBeanName", "robinTestFilter");
filter.addMappingForUrlPatterns(null, true, "/*");
FilterRegistration.Dynamic filterSession = container.addFilter("OpenSession Filter", OpenSessionInViewFilter.class);
Map<String, String> filterMap=new HashMap<>();
filterMap.put("singleSession", "true");
filterMap.put("sessionFactoryBeanName", "sessionFactory");
filterMap.put("flushMode", "COMMIT");
filterSession.setInitParameters(filterMap);
filterSession.addMappingForUrlPatterns(null, true, "/*");
}
}
没有分号,因为我在正常工作的Vue应用中使用了此分号。我只想覆盖其中的弹出框,并想知道我可以直接使用的字段是什么。 (即纬度,经度等)