Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/tagbangers/wallride
Browse files Browse the repository at this point in the history
  • Loading branch information
ogawa-takeshi committed Mar 2, 2017
2 parents 8d00b13 + bce96fb commit f7f7c4a
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 90 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>org.wallride</groupId>
<artifactId>wallride</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
<packaging>pom</packaging>
<name>WallRide</name>
<description>CMS for developers of principles</description>
Expand Down Expand Up @@ -80,7 +80,7 @@
<dependency>
<groupId>org.wallride</groupId>
<artifactId>wallride-core</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
</dependency>

<!-- Spring -->
Expand Down
2 changes: 1 addition & 1 deletion wallride-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.wallride</groupId>
<artifactId>wallride-parent</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
<relativePath>../wallride-parent/pom.xml</relativePath>
</parent>
<artifactId>wallride-bootstrap</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion wallride-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.wallride</groupId>
<artifactId>wallride</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wallride-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@
public class WebGuestConfiguration extends DelegatingWebMvcConfiguration {

@Autowired
private BlogService blogService;

@Autowired
private PageService pageService;
private PageDescribeController pageDescribeController;

@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
Expand All @@ -55,7 +52,7 @@ public RequestMappingHandlerMapping requestMappingHandlerMapping() {
@Override
protected RequestMappingHandlerMapping createRequestMappingHandlerMapping() {
RequestMappingHandlerMapping handlerMapping = super.createRequestMappingHandlerMapping();
handlerMapping.setDefaultHandler(pageDescribeController());
handlerMapping.setDefaultHandler(pageDescribeController);
return handlerMapping;
}

Expand All @@ -64,83 +61,91 @@ protected RequestMappingHandlerAdapter createRequestMappingHandlerAdapter() {
return super.createRequestMappingHandlerAdapter();
}

// Controllers

@Bean
@ConditionalOnMissingBean
public PageDescribeController pageDescribeController() {
return new PageDescribeController(blogService, pageService);
}

@Bean
@ConditionalOnMissingBean
public ArticleDescribeController articleDescribeController() {
return new ArticleDescribeController();
}

@Bean
@ConditionalOnMissingBean
public ArticleIndexController articleIndexController() {
return new ArticleIndexController();
}

@Bean
@ConditionalOnMissingBean
public CommentRestController commentRestController() {
return new CommentRestController();
}

@Bean
@ConditionalOnMissingBean
public LoginController loginController() {
return new LoginController();
}

@Bean
@ConditionalOnMissingBean
public PasswordResetController passwordResetController() {
return new PasswordResetController();
}

@Bean
@ConditionalOnMissingBean
public PasswordUpdateController passwordUpdateController() {
return new PasswordUpdateController();
}

@Bean
@ConditionalOnMissingBean
public ProfileUpdateController profileUpdateController() {
return new ProfileUpdateController();
}

@Bean
@ConditionalOnMissingBean
public SignupController signupController() {
return new SignupController();
}

@Bean
@ConditionalOnMissingBean
public FeedController feedController() {
return new FeedController();
}

@Bean
@ConditionalOnMissingBean
public IndexController indexController() {
return new IndexController();
}

@Bean
@ConditionalOnMissingBean
public SearchController searchController() {
return new SearchController();
}

@Bean
@ConditionalOnMissingBean
public TagController tagController() {
return new TagController();
@Configuration
public static class ControllerConfigration {

@Autowired
private BlogService blogService;

@Autowired
private PageService pageService;

@Bean
@ConditionalOnMissingBean
public PageDescribeController pageDescribeController() {
return new PageDescribeController(blogService, pageService);
}

@Bean
@ConditionalOnMissingBean
public ArticleDescribeController articleDescribeController() {
return new ArticleDescribeController();
}

@Bean
@ConditionalOnMissingBean
public ArticleIndexController articleIndexController() {
return new ArticleIndexController();
}

@Bean
@ConditionalOnMissingBean
public CommentRestController commentRestController() {
return new CommentRestController();
}

@Bean
@ConditionalOnMissingBean
public LoginController loginController() {
return new LoginController();
}

@Bean
@ConditionalOnMissingBean
public PasswordResetController passwordResetController() {
return new PasswordResetController();
}

@Bean
@ConditionalOnMissingBean
public PasswordUpdateController passwordUpdateController() {
return new PasswordUpdateController();
}

@Bean
@ConditionalOnMissingBean
public ProfileUpdateController profileUpdateController() {
return new ProfileUpdateController();
}

@Bean
@ConditionalOnMissingBean
public SignupController signupController() {
return new SignupController();
}

@Bean
@ConditionalOnMissingBean
public FeedController feedController() {
return new FeedController();
}

@Bean
@ConditionalOnMissingBean
public IndexController indexController() {
return new IndexController();
}

@Bean
@ConditionalOnMissingBean
public SearchController searchController() {
return new SearchController();
}

@Bean
@ConditionalOnMissingBean
public TagController tagController() {
return new TagController();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public void preview(
HttpServletRequest request,
HttpServletResponse response) throws Exception {
Article article = new Article();
article.setLanguage(language);
article.setCover(form.getCoverId() != null ? mediaService.getMedia(form.getCoverId()) : null);
article.setTitle(form.getTitle());
article.setBody(form.getBody());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void preview(
HttpServletRequest request,
HttpServletResponse response) throws Exception {
Page page = new Page();
page.setLanguage(language);
page.setCover(form.getCoverId() != null ? mediaService.getMedia(form.getCoverId()) : null);
page.setTitle(form.getTitle());
page.setBody(form.getBody());
Expand Down
4 changes: 2 additions & 2 deletions wallride-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>org.wallride</groupId>
<artifactId>wallride-parent</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
<packaging>pom</packaging>
<name>WallRide Parent</name>
<description>CMS for developers of principles</description>
Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>org.wallride</groupId>
<artifactId>wallride-core</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion wallride-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.wallride</groupId>
<artifactId>wallride</artifactId>
<version>1.0.0.M13</version>
<version>1.0.0.M14</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wallride-tools</artifactId>
Expand Down

0 comments on commit f7f7c4a

Please sign in to comment.