@Bean public ResourceBundleViewResolver bundleViewResolver(){ ResourceBundleViewResolver viewResolverB = new ResourceBundleViewResolver(); viewResolverB.setBasename("config.views"); viewResolverB.setOrder(0); return viewResolverB; }
@Before public void setup() { ResourceBundleViewResolver viewResolver = new ResourceBundleViewResolver(); viewResolver.setBasename("config.views"); mockMvc = MockMvcBuilders.standaloneSetup(new LoginController()) .setViewResolvers(viewResolver) .build(); }
@Before public void setup() { ResourceBundleViewResolver viewResolver = new ResourceBundleViewResolver(); viewResolver.setBasename("config.views"); mockMvc = MockMvcBuilders.standaloneSetup(new AdminController()). setViewResolvers(viewResolver).build(); }
@Before public void setup() { MockitoAnnotations.initMocks(this); ResourceBundleViewResolver viewResolver = new ResourceBundleViewResolver(); viewResolver.setBasename("config.views"); mockMvc = MockMvcBuilders.standaloneSetup(loginController). setViewResolvers(viewResolver).build(); when(loginValidator.supports(any(Class.class))).thenReturn(true); }
@Bean public ResourceBundleViewResolver setViewResolver() { ResourceBundleViewResolver viewResolver = new ResourceBundleViewResolver(); viewResolver.setBasename("config.views"); return viewResolver; }