@Deprecated public class Mixer2XhtmlViewResolver extends org.springframework.web.context.support.WebApplicationObjectSupport implements org.springframework.web.servlet.ViewResolver, org.springframework.core.Ordered
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.2.RELEASE (or higher)</version>
</dependency>
Spring MVC configuration Sample
<bean id="mixer2Engine" class="org.mixer2.Mixer2Engine" />
<bean class="org.mixer2.springmvc.Mixer2XhtmlViewResolver">
<property name="mixer2Engine" ref="mixer2Engine" />
<property name="order" value="1" />
</bean>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="order" value="2" />
</bean>
Using this ViewResolver,
Your controller method can returns
view class name as String.
See also AbstractMixer2XhtmlView
.
@Controller
public class HelloWorldController {
@Autowired
protected helloMessageService helloMessageService;
@RequestMapping(value = "/hello", method = RequestMethod.GET)
public String showHello( @PathVariable long itemId, Model model) {
String helloMessage = helloMessageService.getMessage();
model.addAttribute("helloMessage", helloMessage);
return "helloWorldView"; // attach "HelloWorldView" class.
}
}
AbstractMixer2XhtmlView
Modifier and Type | Field and Description |
---|---|
protected Mixer2Engine |
mixer2Engine
Deprecated.
|
Constructor and Description |
---|
Mixer2XhtmlViewResolver()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Mixer2Engine |
getMixer2Engine()
Deprecated.
|
int |
getOrder()
Deprecated.
|
org.springframework.web.servlet.View |
resolveViewName(String viewName,
Locale locale)
Deprecated.
|
void |
setMixer2Engine(Mixer2Engine mixer2Engine)
Deprecated.
|
void |
setOrder(int order)
Deprecated.
|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
protected Mixer2Engine mixer2Engine
public org.springframework.web.servlet.View resolveViewName(String viewName, Locale locale)
resolveViewName
in interface org.springframework.web.servlet.ViewResolver
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
public void setOrder(int order)
public void setMixer2Engine(Mixer2Engine mixer2Engine)
public Mixer2Engine getMixer2Engine()
Copyright © 2021 Project Mixer2. All rights reserved.