@ -29,20 +29,7 @@ public class App {
|
||||
|
||||
@EventListener(ApplicationReadyEvent.class)
|
||||
public void importData() {
|
||||
User filip = new User();
|
||||
filip.setEmail("filizy@st.amu.edu.pl");
|
||||
filip.setName("Filip");
|
||||
filip.setSurname("Izydorczyk");
|
||||
filip.setRole(UserRoles.STUDENT);
|
||||
this.userService.save(filip);
|
||||
|
||||
User hub = new User();
|
||||
hub.setEmail("hubwrz1@st.amu.edu.pl");
|
||||
hub.setName("Hubert");
|
||||
hub.setSurname("Wrzesiński");
|
||||
hub.setRole(UserRoles.STUDENT);
|
||||
this.userService.save(hub);
|
||||
|
||||
|
||||
User mac = new User();
|
||||
mac.setEmail("macglo2@st.amu.edu.pl");
|
||||
mac.setName("Maciej");
|
||||
|
@ -8,6 +8,7 @@ import com.plannaplan.security.cas.CustomUAMCasValidator;
|
||||
import com.plannaplan.services.UserService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
@ -24,7 +25,8 @@ import io.swagger.annotations.ApiParam;
|
||||
@Api(tags = { "Token" }, value = "Token", description = "Enpoints to get authorization.")
|
||||
public class TokenController {
|
||||
|
||||
private final static String SERVICE_URL = "https://wmi.plannaplan.pl";
|
||||
@Value("${plannaplan.frontendUrl}")
|
||||
private String SERVICE_URL;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
@ -9,4 +9,6 @@ spring.jackson.serialization.fail-on-empty-beans=false
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
spring.jackson.default-property-inclusion = NON_NULL
|
||||
|
||||
server.port=1285
|
||||
server.port=1285
|
||||
|
||||
plannaplan.frontendUrl = http://localhost:3000
|
Reference in New Issue
Block a user