This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @RequestMapping(value = "/someurl", method = RequestMethod.GET) | |
| public ModelAndView myNotSoVerboseMethod(MyRequestParams requestParams) { | |
| ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo.bar; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.RequestMethod; | |
| @Controller | |
| public class MyContoller{ | |
| ... | |
| @RequestMapping(value = "/someurl", method = RequestMethod.GET) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| public class MyBeanImpl { | |
| @Autowired | |
| private ApplicationContext ctx; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo; | |
| import org.springframework.context.ApplicationContextAware; | |
| public class MyBeanImpl implements ApplicationContextAware { | |
| private ApplicationContext ctx; | |
| public void setApplicationContext(ApplicationContext context) { | |
| this.ctx=context; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo.bar; | |
| import org.springframework.context.ApplicationContextInitializer; | |
| import org.springframework.context.ConfigurableApplicationContext; | |
| import org.springframework.core.env.ConfigurableEnvironment; | |
| public class MyContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { | |
| public void initialize(ConfigurableApplicationContext applicationContext) { | |
| ConfigurableEnvironment springEnvironment = applicationContext.getEnvironment(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <web-app> | |
| .. | |
| <servlet> | |
| <servlet-name>dispatcher</servlet-name> | |
| <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | |
| <init-param> | |
| <param-name>contextInitializerClasses</param-name> | |
| <param-value>foo.bar.MyContextInitializer</param-value> | |
| </init-param> | |
| </servlet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo.bar; | |
| import org.springframework.context.ApplicationContextInitializer; | |
| import org.springframework.context.ConfigurableApplicationContext; | |
| import org.springframework.core.env.ConfigurableEnvironment; | |
| public class MyContextInitializer implements | |
| ApplicationContextInitializer<ConfigurableApplicationContext> { | |
| private static final String PROP = "com.google.appengine.runtime.environment"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <web-app> | |
| ... | |
| <servlet> | |
| <servlet-name>dispatcher</servlet-name> | |
| <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | |
| <init-param> | |
| <param-name>spring.profiles.active</param-name> | |
| <param-value>production</param-value> | |
| </init-param> | |
| </servlet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% extends "base.html" %} | |
| {% block content %} | |
| <div id="part-content"> | |
| {% if posts %} | |
| {% for post in posts %} | |
| <div id="post-{{post.id}}" class="post-home"> | |
| <div class="post-title"> | |
| <h1><a href="{{post.link}}" rel="bookmark">{{post.title}}</a></h1> | |
| </div> | |
| <div class="post-content">{{post.preview}}</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <beans> | |
| ... | |
| <bean id="jangodConf" | |
| class="org.springframework.web.servlet.view.jangod.JangodConfigurer"> | |
| <property name="configurationFile" value="jangod.config.properties" /> | |
| </bean> | |
| <bean class="org.springframework.web.servlet.view.jangod.JangodViewResolver"> | |
| <property name="jangodConfig" ref="jangodConf" /> | |
| <property name="prefix" value="/WEB-INF/views" /> | |
| <property name="suffix" value=".html" /> |