PAN-54 Runs successfully but closes before the webpage can be loaded.
This commit is contained in:
@@ -99,6 +99,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':services')
|
||||
compile group: 'org.jacoco', name: 'org.jacoco.core', version: '0.8.3'
|
||||
compile 'org.codehaus.groovy:groovy-all:2.3.11'
|
||||
compile 'org.apache.commons:commons-lang3:3.5'
|
||||
|
||||
@@ -2,10 +2,11 @@ package edu.msudenver.tsp.website;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@SpringBootApplication
|
||||
@ComponentScan("edu.msudenver.tsp")
|
||||
public class Application {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package edu.msudenver.tsp.website.controller;
|
||||
|
||||
import edu.msudenver.tsp.services.UserService;
|
||||
import edu.msudenver.tsp.services.dto.Account;
|
||||
import edu.msudenver.tsp.website.forms.UserCreationForm;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -16,6 +19,9 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/createuser")
|
||||
public class UserCreationController {
|
||||
@Autowired
|
||||
private final UserService userService;
|
||||
|
||||
@GetMapping({"/",""})
|
||||
public ModelAndView createUserPage() {
|
||||
LOG.info("Received request to display the user creation page: returning model with name 'User'");
|
||||
@@ -36,12 +42,10 @@ public class UserCreationController {
|
||||
|
||||
LOG.info("Saving user {}...", userCreationForm);
|
||||
|
||||
/*
|
||||
final Account newUser = new Account();
|
||||
newUser.setUsername(userCreationForm.getUsername());
|
||||
newUser.setPassword(userCreationForm.getPassword());
|
||||
userService.createAccount(newUser);
|
||||
*/
|
||||
|
||||
return "successfulRegistration";
|
||||
}
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
spring.mvc.view.prefix:/WEB-INF/jsp/
|
||||
spring.mvc.view.suffix:.jsp
|
||||
|
||||
persistence.api.connection.timeout.milliseconds=5000
|
||||
persistence.api.socket.timeout.milliseconds=10000
|
||||
persistence.api.base.url=http://localhost:8090/
|
||||
@@ -14,7 +14,7 @@ import static org.mockito.Mockito.mock;
|
||||
public class UserCreationControllerTest {
|
||||
|
||||
private final UserService userService = mock(UserService.class);
|
||||
private final UserCreationController userCreationController = new UserCreationController();//userService);
|
||||
private final UserCreationController userCreationController = new UserCreationController(userService);
|
||||
|
||||
@Test
|
||||
public void testCreateUserPage() {
|
||||
|
||||
Reference in New Issue
Block a user