BAEL-1085#2428
Conversation
| @@ -0,0 +1,20 @@ | |||
| package net.baeldung; | |||
There was a problem hiding this comment.
Normally, the convention is com, org, then net (used rarely). I thought it easier to simply and cleanly add my code into a separate grouping. However, I think I'm supposed to move this over to Spring Angular instead. So... my point is moot.
| import org.springframework.boot.web.support.SpringBootServletInitializer; | ||
|
|
||
| @SpringBootApplication | ||
| public class ApplicationMain extends SpringBootServletInitializer { |
There was a problem hiding this comment.
Do we need SpringBootServletInitializer? I believe that should work only with the @SpringBootApplication
| @RequestMapping("/post") | ||
| public class ExamplePostController { | ||
|
|
||
| Logger log = LoggerFactory.getLogger(ExamplePostController.class); |
There was a problem hiding this comment.
private static final log
There was a problem hiding this comment.
Will make that change.
| public class ExampleService { | ||
|
|
||
| public boolean fakeAuthenticate(LoginForm lf) { | ||
| return (lf.getUsername().equals(lf.getUsername()) && lf.getPassword() == lf.getPassword()); |
There was a problem hiding this comment.
Wouldn't it be easier to simply return true?
There was a problem hiding this comment.
Yeah - it could be simplified - just wanted to flesh that out - here it does qualify as a kind of authentication check since it compares values.
| private String username; | ||
| private String password; | ||
|
|
||
| public LoginForm() {}; |
| .permitAll() | ||
| .antMatchers("/secured/**/**", | ||
| "/secured/success", "/secured/socket", "/secured/success") | ||
| "/secured/success", "/secured/socket") |
There was a problem hiding this comment.
No but this is a minor change requested elsewhere.
| } | ||
| } | ||
|
|
||
| @After |
There was a problem hiding this comment.
True but leaving the full before, test, and after trio allows someone learning to see how a good test should be set up.
| } | ||
| } | ||
|
|
||
| @After |
There was a problem hiding this comment.
Same here, you can remove that
|
This code is being moved over to Spring-Rest-Angular per document review! Most of the points above are moot due to that change but some will be incorporated for sure. Thanks! |
…integration to unit test - all's good
… the incorrect process - reverting now, article has been corrected, but will issue a seperate PR for this
|
Had removed a duplicate ant matcher from BAEL-509 - this was the incorrect process - reverting now, article has been corrected, but will issue a separate PR for this |
No description provided.