Compare commits

...

19 Commits
dev ... lk

Author SHA1 Message Date
Artem.Arefev
a50aa383d9 merged with dev 2019-05-14 22:21:27 +04:00
arefiev1997
9c53257729 fixed lk page 2019-05-12 22:26:50 +04:00
arefiev1997
ed8855272f lk base 2019-05-11 22:06:31 +04:00
arefiev1997
09aa0bd4d6 Merge remote-tracking branch 'origin/move-to-jdk11' into lk 2019-05-06 00:38:58 +04:00
Anton Romanov
4d2d7fa113 fix lambda 2019-04-26 09:47:41 +04:00
Anton Romanov
9393fbe326 fix deprecated imports 2019-04-26 09:46:38 +04:00
Anton Romanov
955bdaa438 fix repository method 2019-04-23 13:55:59 +04:00
Anton Romanov
60dfad5d76 Merge branch 'dev' into move-to-jdk11
# Conflicts:
#	src/main/resources/db/changelog-master.xml
2019-04-23 13:51:21 +04:00
Anton Romanov
e16b1da761 fix script 2019-04-23 12:46:17 +04:00
Anton Romanov
09cae66ca4 fix image 2019-04-23 12:38:15 +04:00
Anton Romanov
7684bac74d Merge branch 'dev' into move-to-jdk11
# Conflicts:
#	build.gradle
#	src/main/java/ru/ulstu/grant/model/GrantDto.java
#	src/main/java/ru/ulstu/grant/service/GrantService.java
#	src/main/java/ru/ulstu/paper/model/PaperDto.java
#	src/main/java/ru/ulstu/project/model/Project.java
2019-04-23 11:35:41 +04:00
Anton Romanov
2cf3e52596 #73 merge dev into jdk11 2019-04-05 14:11:13 +04:00
Anton Romanov
167de9bf65 #73 fix deprecated parameters 2019-03-20 20:35:24 +04:00
Anton Romanov
993a034527 #73 restore authentication 2019-03-20 20:32:10 +04:00
Anton Romanov
9bd954ea9b #73 fix new thymeleaf syntax 2019-03-20 20:31:46 +04:00
Anton Romanov
1487affb8e #73 fix deprecated annotations and classes 2019-03-20 19:20:28 +04:00
Anton Romanov
e74261184f #73 first fixes by update versions 2019-03-20 14:37:57 +04:00
Anton Romanov
13131186bf Merge branch 'dev' into 'master'
Dev

See merge request romanov73/ng-tracker!27
2019-03-04 10:04:02 +00:00
Anton Romanov
f7bbf4d746 Merge branch 'dev' into 'master'
Dev to master

See merge request romanov73/ng-tracker!25
2019-01-16 21:04:20 +00:00
62 changed files with 311 additions and 200 deletions

View File

@ -1,16 +1,16 @@
image: romanov73/is:ng-tracker-container
image: romanov73/is:ng-tracker-container-11
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- service postgresql stop
- service postgresql start
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- git log --pretty="%cn;%cd;%s" > src/main/resources/commits.log
- service postgresql stop
- service postgresql start
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- git log --pretty="%cn;%cd;%s" > src/main/resources/commits.log
build:
stage: build

View File

@ -1,6 +1,6 @@
buildscript {
ext {
versionSpringBoot = '1.5.10.RELEASE'
versionSpringBoot = '2.1.3.RELEASE'
}
repositories {
@ -105,13 +105,14 @@ dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity4'
compile group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect'
compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity5'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-afterburner'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hibernate5'
compile group: 'postgresql', name: 'postgresql', version: '9.1-901.jdbc4'
compile group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
compile group: 'org.liquibase', name: 'liquibase-core', version: '3.5.3'
compile group: 'org.liquibase', name: 'liquibase-core', version: '3.6.3'
compile group: 'com.mattbertolini', name: 'liquibase-slf4j', version: '2.0.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip

View File

@ -2,7 +2,6 @@ package ru.ulstu.conference.model;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.deadline.model.Deadline;
@ -20,6 +19,7 @@ import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;

View File

@ -2,14 +2,15 @@ package ru.ulstu.conference.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.name.NameContainer;
import ru.ulstu.paper.model.Paper;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
@ -89,8 +90,8 @@ public class ConferenceDto extends NameContainer {
this.beginDate = conference.getBeginDate();
this.endDate = conference.getEndDate();
this.deadlines = conference.getDeadlines();
this.userIds = convert(conference.getUsers(), user -> user.getId());
this.paperIds = convert(conference.getPapers(), paper -> paper.getId());
this.userIds = convert(conference.getUsers(), BaseEntity::getId);
this.paperIds = convert(conference.getPapers(), BaseEntity::getId);
this.users = conference.getUsers();
this.papers = conference.getPapers();
}

View File

@ -27,7 +27,7 @@ public class ConferenceUserService {
@Transactional
public ConferenceUser update(ConferenceUser user) {
ConferenceUser updateUser = conferenceUserRepository.findOne(user.getId());
ConferenceUser updateUser = conferenceUserRepository.getOne(user.getId());
updateUser.setDeposit(user.getDeposit());
updateUser.setParticipation(user.getParticipation());
conferenceUserRepository.save(updateUser);

View File

@ -1,10 +1,11 @@
package ru.ulstu.configuration;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotBlank;
@Component
@ConfigurationProperties(prefix = "ng-tracker")
@Validated

View File

@ -2,18 +2,18 @@ package ru.ulstu.configuration;
import org.eclipse.jetty.server.ServerConnector;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.jetty.JettyServerCustomizer;
import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.context.annotation.Configuration;
@Configuration
public class HttpListenerConfiguration implements EmbeddedServletContainerCustomizer {
public class HttpListenerConfiguration implements WebServerFactoryCustomizer<ConfigurableWebServerFactory> {
@Value("${server.http.port}")
private int httpPort;
private void configureJetty(JettyEmbeddedServletContainerFactory jettyFactory) {
private void configureJetty(JettyServletWebServerFactory jettyFactory) {
jettyFactory.addServerCustomizers((JettyServerCustomizer) server -> {
ServerConnector serverConnector = new ServerConnector(server);
serverConnector.setPort(httpPort);
@ -22,9 +22,9 @@ public class HttpListenerConfiguration implements EmbeddedServletContainerCustom
}
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
if (container instanceof JettyEmbeddedServletContainerFactory) {
configureJetty((JettyEmbeddedServletContainerFactory) container);
public void customize(ConfigurableWebServerFactory factory) {
if (factory instanceof JettyServletWebServerFactory) {
configureJetty((JettyServletWebServerFactory) factory);
}
}
}

View File

@ -3,8 +3,8 @@ package ru.ulstu.configuration;
import nz.net.ultraq.thymeleaf.LayoutDialect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect;
import org.thymeleaf.spring4.SpringTemplateEngine;
import org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect;
import org.thymeleaf.spring5.SpringTemplateEngine;
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
import org.thymeleaf.templateresolver.ITemplateResolver;
@ -17,7 +17,6 @@ public class MailTemplateConfiguration {
final SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.addTemplateResolver(templateResolver);
templateEngine.addTemplateResolver(emailTemplateResolver());
templateEngine.addTemplateResolver(mvcTemplateResolver());
templateEngine.addDialect(new LayoutDialect());
templateEngine.addDialect(sec);
return templateEngine;
@ -25,22 +24,10 @@ public class MailTemplateConfiguration {
public ClassLoaderTemplateResolver emailTemplateResolver() {
ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
emailTemplateResolver.setPrefix("mail_templates/");
emailTemplateResolver.setTemplateMode("HTML5");
emailTemplateResolver.setPrefix("/mail_templates/");
emailTemplateResolver.setTemplateMode("HTML");
emailTemplateResolver.setSuffix(".html");
emailTemplateResolver.setOrder(1);
emailTemplateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name());
return emailTemplateResolver;
}
public ClassLoaderTemplateResolver mvcTemplateResolver() {
ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
emailTemplateResolver.setPrefix("templates");
emailTemplateResolver.setTemplateMode("HTML5");
emailTemplateResolver.setSuffix(".html");
emailTemplateResolver.setOrder(2);
emailTemplateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name());
return emailTemplateResolver;
}
}

View File

@ -3,10 +3,10 @@ package ru.ulstu.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class MvcConfiguration extends WebMvcConfigurerAdapter {
public class MvcConfiguration implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/{articlename:\\w+}");

View File

@ -6,19 +6,19 @@ import org.springframework.data.domain.Sort;
import java.io.Serializable;
public class OffsetablePageRequest implements Pageable, Serializable {
private final int offset;
private final long offset;
private final int count;
private final Sort sort;
public OffsetablePageRequest(int offset, int count) {
public OffsetablePageRequest(long offset, int count) {
this(offset, count, null);
}
public OffsetablePageRequest(int offset, int count, Sort.Direction direction, String... properties) {
public OffsetablePageRequest(long offset, int count, Sort.Direction direction, String... properties) {
this(offset, count, new Sort(direction, properties));
}
public OffsetablePageRequest(int offset, int count, Sort sort) {
public OffsetablePageRequest(long offset, int count, Sort sort) {
if (offset < 0) {
throw new IllegalArgumentException("Offset value must not be less than zero!");
}
@ -42,11 +42,11 @@ public class OffsetablePageRequest implements Pageable, Serializable {
@Override
public int getPageNumber() {
return offset / count;
return (int) (offset / count);
}
@Override
public int getOffset() {
public long getOffset() {
return offset;
}
@ -89,9 +89,9 @@ public class OffsetablePageRequest implements Pageable, Serializable {
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
long result = 1;
result = prime * result + offset;
result = prime * result + count;
return result;
return (int) result;
}
}

View File

@ -26,7 +26,7 @@ public class DeadlineService {
@Transactional
public Deadline update(Deadline deadline) {
Deadline updateDeadline = deadlineRepository.findOne(deadline.getId());
Deadline updateDeadline = deadlineRepository.getOne(deadline.getId());
updateDeadline.setDate(deadline.getDate());
updateDeadline.setDescription(deadline.getDescription());
deadlineRepository.save(updateDeadline);
@ -44,6 +44,6 @@ public class DeadlineService {
@Transactional
public void remove(Integer deadlineId) {
deadlineRepository.delete(deadlineId);
deadlineRepository.deleteById(deadlineId);
}
}

View File

@ -69,7 +69,7 @@ public class FileService {
}
public FileData getFile(Integer fileId) {
return fileRepository.findOne(fileId);
return fileRepository.getOne(fileId);
}
public void deleteTmpFile(String tmpFileName) throws IOException {
@ -98,7 +98,7 @@ public class FileService {
@Transactional
public FileData update(FileDataDto fileDataDto) {
FileData file = fileRepository.findOne(fileDataDto.getId());
FileData file = fileRepository.getOne(fileDataDto.getId());
return fileRepository.save(copyFromDto(file, fileDataDto));
}
@ -117,7 +117,7 @@ public class FileService {
@Transactional
public void delete(Integer fileId) {
fileRepository.delete(fileRepository.findOne(fileId));
fileRepository.delete(fileRepository.getOne(fileId));
}
public FileDataDto createFromMultipartFile(MultipartFile multipartFile) throws IOException {
@ -134,7 +134,7 @@ public class FileService {
File renamed = getTmpFilePath(fileDataDto.getName()).toFile();
oldFile.renameTo(renamed);
} else {
Files.write(getTmpFilePath(fileDataDto.getName()), fileRepository.findOne(fileDataDto.getId()).getData());
Files.write(getTmpFilePath(fileDataDto.getName()), fileRepository.getOne(fileDataDto.getId()).getData());
}
}
}

View File

@ -3,13 +3,13 @@ package ru.ulstu.grant.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.file.model.FileDataDto;
import ru.ulstu.paper.model.PaperDto;
import ru.ulstu.project.model.ProjectDto;
import ru.ulstu.user.model.UserDto;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

View File

@ -1,13 +1,13 @@
package ru.ulstu.odin.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.core.error.OdinException;
import ru.ulstu.odin.model.annotation.OdinCaption;
import ru.ulstu.odin.model.annotation.OdinReadOnly;
import ru.ulstu.odin.model.annotation.OdinVisible;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

View File

@ -1,9 +1,9 @@
package ru.ulstu.odin.model;
import org.hibernate.validator.constraints.Email;
import ru.ulstu.odin.model.annotation.OdinString;
import ru.ulstu.odin.model.annotation.OdinString.OdinStringType;
import javax.validation.constraints.Email;
import javax.validation.constraints.Size;
import java.lang.reflect.Field;

View File

@ -3,11 +3,11 @@ package ru.ulstu.paper.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.file.model.FileDataDto;
import ru.ulstu.user.model.UserDto;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;

View File

@ -1,6 +1,5 @@
package ru.ulstu.project.model;
import org.hibernate.validator.constraints.NotBlank;
import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.file.model.FileData;
@ -13,6 +12,7 @@ import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

View File

@ -2,10 +2,10 @@ package ru.ulstu.project.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.grant.model.GrantDto;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;

View File

@ -48,7 +48,7 @@ public class ProjectService {
}
public ProjectDto findOneDto(Integer id) {
return new ProjectDto(projectRepository.findOne(id));
return new ProjectDto(projectRepository.getOne(id));
}
public List<Project.ProjectStatus> getProjectStatuses() {
@ -86,7 +86,7 @@ public class ProjectService {
project.setStatus(projectDto.getStatus() == null ? APPLICATION : projectDto.getStatus());
project.setTitle(projectDto.getTitle());
if (projectDto.getGrant() != null && projectDto.getGrant().getId() != null) {
project.setGrant(grantRepository.findOne(projectDto.getGrant().getId()));
project.setGrant(grantRepository.getOne(projectDto.getGrant().getId()));
}
project.setRepository(projectDto.getRepository());
project.setDeadlines(deadlineService.saveOrCreate(projectDto.getDeadlines()));
@ -105,7 +105,7 @@ public class ProjectService {
}
public Project findById(Integer id) {
return projectRepository.findOne(id);
return projectRepository.getOne(id);
}
}

View File

@ -2,7 +2,6 @@ package ru.ulstu.students.model;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.validator.constraints.NotBlank;
import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.tags.model.Tag;
@ -20,6 +19,7 @@ import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

View File

@ -3,10 +3,10 @@ package ru.ulstu.students.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.tags.model.Tag;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

View File

@ -2,12 +2,12 @@ package ru.ulstu.tags.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.core.model.BaseEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
@Entity

View File

@ -34,7 +34,7 @@ public class TagService {
@Transactional
public Tag getExistById(Tag tag) {
return tagRepository.findOne(tag.getId());
return tagRepository.getOne(tag.getId());
}
@Transactional

View File

@ -65,7 +65,7 @@ public class EventService {
@Transactional
public Integer update(EventDto eventDto) {
Event event = eventRepository.findOne(eventDto.getId());
Event event = eventRepository.getOne(eventDto.getId());
return eventRepository.save(copyFromDto(event, eventDto)).getId();
}
@ -76,13 +76,13 @@ public class EventService {
@Transactional
public void delete(Integer eventId) {
Event event = eventRepository.findOne(eventId);
Event event = eventRepository.getOne(eventId);
event.setParents(null);
eventRepository.delete(event);
}
public List<Event> findByIds(List<Integer> ids) {
return eventRepository.findAll(ids);
return eventRepository.findAllById(ids);
}
public void createBasedOn(Event event, Date executeDate) {
@ -97,7 +97,7 @@ public class EventService {
event = eventRepository.save(event);
//set child to parent
Event parentEvent = eventRepository.findOne(parentEventId);
Event parentEvent = eventRepository.getOne(parentEventId);
parentEvent.setChild(event);
eventRepository.save(parentEvent);
}
@ -127,7 +127,7 @@ public class EventService {
}
public void updatePaperDeadlines(Paper paper) {
eventRepository.delete(eventRepository.findAllByPaper(paper));
eventRepository.deleteAll(eventRepository.findAllByPaper(paper));
createFromPaper(paper);
}

View File

@ -48,13 +48,13 @@ public class TimelineService {
@Transactional
public Integer update(TimelineDto timelineDto) {
Timeline timeline = timelineRepository.findOne(timelineDto.getId());
Timeline timeline = timelineRepository.getOne(timelineDto.getId());
return timelineRepository.save(copyFromDto(timeline, timelineDto)).getId();
}
@Transactional
public void delete(Integer timelineId) {
Timeline timeline = timelineRepository.findOne(timelineId);
Timeline timeline = timelineRepository.getOne(timelineId);
timelineRepository.delete(timeline);
}
}

View File

@ -3,15 +3,9 @@ package ru.ulstu.user.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import ru.ulstu.configuration.Constants;
import ru.ulstu.core.model.response.PageableItems;
import ru.ulstu.core.model.response.Response;
@ -19,15 +13,12 @@ import ru.ulstu.odin.controller.OdinController;
import ru.ulstu.odin.model.OdinMetadata;
import ru.ulstu.odin.model.OdinVoid;
import ru.ulstu.odin.service.OdinService;
import ru.ulstu.user.model.UserDto;
import ru.ulstu.user.model.UserListDto;
import ru.ulstu.user.model.UserResetPasswordDto;
import ru.ulstu.user.model.UserRoleConstants;
import ru.ulstu.user.model.UserRoleDto;
import ru.ulstu.user.model.UserSessionListDto;
import ru.ulstu.user.model.*;
import ru.ulstu.user.service.UserService;
import ru.ulstu.user.service.UserSessionService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import static ru.ulstu.user.controller.UserController.URL;
@ -142,8 +133,8 @@ public class UserController extends OdinController<UserListDto, UserDto> {
}
// TODO: add page for user edit (user-profile)
@PostMapping("/change-information")
public Response<UserDto> changeInformation(@Valid @RequestBody UserDto userDto) {
@PostMapping(value = "/change-information", params = "save")
public Response<UserDto> changeInformation(@Valid UserDto userDto) {
log.debug("REST: UserController.changeInformation( {} )", userDto.getLogin());
return new Response<>(userService.updateUserInformation(userDto));
}

View File

@ -0,0 +1,35 @@
package ru.ulstu.user.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import ru.ulstu.configuration.Constants;
import ru.ulstu.user.model.User;
import ru.ulstu.user.model.UserDto;
import ru.ulstu.user.service.UserSessionService;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@Controller
@RequestMapping(value = "/profile")
@ApiIgnore
public class UserProfileController {
private final UserSessionService userSessionService;
public UserProfileController(UserSessionService userSessionService)
{
this.userSessionService = userSessionService;
}
@GetMapping("/profile")
public void getUserProfile(ModelMap modelMap, HttpServletRequest request) {
HttpSession session = request.getSession(false);
final String sessionId = session.getAttribute(Constants.SESSION_ID_ATTR).toString();
UserDto userDto = userSessionService.getUserBySessionId(sessionId);
modelMap.addAttribute("userDto", userDto);
}
}

View File

@ -1,7 +1,6 @@
package ru.ulstu.user.model;
import org.hibernate.annotations.BatchSize;
import org.hibernate.validator.constraints.Email;
import ru.ulstu.configuration.Constants;
import ru.ulstu.core.model.BaseEntity;
@ -15,6 +14,7 @@ import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

View File

@ -1,8 +1,6 @@
package ru.ulstu.user.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.util.StringUtils;
import ru.ulstu.configuration.Constants;
import ru.ulstu.odin.model.OdinDto;
@ -12,6 +10,8 @@ import ru.ulstu.odin.model.annotation.OdinString;
import ru.ulstu.odin.model.annotation.OdinVisible;
import ru.ulstu.user.controller.UserController;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Collection;

View File

@ -1,8 +1,8 @@
package ru.ulstu.user.model;
import org.hibernate.validator.constraints.NotEmpty;
import ru.ulstu.configuration.Constants;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.Objects;

View File

@ -8,7 +8,7 @@ import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine;
import org.thymeleaf.spring5.SpringTemplateEngine;
import ru.ulstu.configuration.ApplicationProperties;
import ru.ulstu.configuration.Constants;
import ru.ulstu.user.model.User;
@ -19,11 +19,9 @@ import java.util.Map;
@Service
public class MailService {
private final Logger log = LoggerFactory.getLogger(MailService.class);
private static final String USER = "user";
private static final String BASE_URL = "baseUrl";
private final Logger log = LoggerFactory.getLogger(MailService.class);
private final JavaMailSender javaMailSender;
private final SpringTemplateEngine templateEngine;
private final MailProperties mailProperties;

View File

@ -26,7 +26,7 @@ public class UserMapper {
public Set<UserRole> rolesFromDto(Set<UserRoleDto> strings) {
return Optional.ofNullable(strings).orElse(Collections.emptySet()).stream()
.filter(Objects::nonNull)
.map(role -> userRoleRepository.findOne(role.getId().toString()))
.map(role -> userRoleRepository.getOne(role.getId().toString()))
.filter(Objects::nonNull)
.collect(Collectors.toSet());
}

View File

@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Sort;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder;
@ -93,7 +94,7 @@ public class UserService implements UserDetailsService {
@Transactional(readOnly = true)
public PageableItems<UserListDto> getAllUsers(int offset, int count) {
final Page<User> page = userRepository.findAll(new OffsetablePageRequest(offset, count, new Sort("id")));
final Page<User> page = userRepository.findAll(new OffsetablePageRequest(offset, count, Sort.by("id")));
return new PageableItems<>(page.getTotalElements(), userMapper.userEntitiesToUserListDtos(page.getContent()));
}
@ -163,7 +164,7 @@ public class UserService implements UserDetailsService {
userDto.getId())) {
throw new UserLoginExistsException(userDto.getLogin());
}
User user = userRepository.findOne(userDto.getId());
User user = userRepository.getOne(userDto.getId());
if (user == null) {
throw new UserNotFoundException(userDto.getId().toString());
}
@ -215,7 +216,7 @@ public class UserService implements UserDetailsService {
userDto.getId())) {
throw new UserEmailExistsException(userDto.getEmail());
}
User user = userRepository.findOne(userDto.getId());
User user = userRepository.getOne(userDto.getId());
if (user == null) {
throw new UserNotFoundException(userDto.getId().toString());
}
@ -234,7 +235,7 @@ public class UserService implements UserDetailsService {
if (!userDto.isPasswordsValid() || !userDto.isOldPasswordValid()) {
throw new UserPasswordsNotValidOrNotMatchException();
}
final String login = UserUtils.getCurrentUserLogin();
final String login = UserUtils.getCurrentUserLogin(SecurityContextHolder.getContext());
final User user = userRepository.findOneByLoginIgnoreCase(login);
if (user == null) {
throw new UserNotFoundException(login);
@ -280,7 +281,7 @@ public class UserService implements UserDetailsService {
}
public UserDto deleteUser(Integer userId) {
final User user = userRepository.findOne(userId);
final User user = userRepository.getOne(userId);
if (user == null) {
throw new UserNotFoundException(userId.toString());
}
@ -309,15 +310,15 @@ public class UserService implements UserDetailsService {
}
public List<User> findByIds(List<Integer> ids) {
return userRepository.findAll(ids);
return userRepository.findAllById(ids);
}
public User findById(Integer id) {
return userRepository.findOne(id);
return userRepository.getOne(id);
}
public User getCurrentUser() {
String login = UserUtils.getCurrentUserLogin();
String login = UserUtils.getCurrentUserLogin(SecurityContextHolder.getContext());
User user = userRepository.findOneByLoginIgnoreCase(login);
if (user == null) {
throw new UserNotFoundException(login);

View File

@ -10,10 +10,13 @@ import ru.ulstu.core.jpa.OffsetablePageRequest;
import ru.ulstu.core.model.response.PageableItems;
import ru.ulstu.user.error.UserNotFoundException;
import ru.ulstu.user.model.User;
import ru.ulstu.user.model.UserDto;
import ru.ulstu.user.model.UserSession;
import ru.ulstu.user.model.UserSessionListDto;
import ru.ulstu.user.repository.UserSessionRepository;
import javax.mail.Session;
import static ru.ulstu.core.util.StreamApiUtils.convert;
@Service
@ -22,10 +25,12 @@ public class UserSessionService {
private final Logger log = LoggerFactory.getLogger(UserSessionService.class);
private final UserSessionRepository userSessionRepository;
private final UserService userService;
private final UserMapper userMapper;
public UserSessionService(UserSessionRepository userSessionRepository, UserService userService) {
public UserSessionService(UserSessionRepository userSessionRepository, UserService userService, UserMapper userMapper) {
this.userSessionRepository = userSessionRepository;
this.userService = userService;
this.userMapper = userMapper;
}
@Transactional(readOnly = true)
@ -54,4 +59,9 @@ public class UserSessionService {
userSessionRepository.save(userSession);
log.debug("User session {} closed", sessionId);
}
public UserDto getUserBySessionId(String sessionId) {
User user = userSessionRepository.findOneBySessionId(sessionId).getUser();
return new UserDto(user);
}
}

View File

@ -17,12 +17,12 @@ public class UserUtils {
return RandomStringUtils.randomNumeric(DEF_COUNT);
}
public static String getCurrentUserLogin() {
final SecurityContext securityContext = SecurityContextHolder.getContext();
public static String getCurrentUserLogin(SecurityContext securityContext) {
if (securityContext == null) {
return null;
}
final Authentication authentication = securityContext.getAuthentication();
if (authentication.getPrincipal() instanceof UserDetails) {
final UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
return springSecurityUser.getUsername();

View File

@ -2,12 +2,11 @@
spring.main.banner-mode=off
server.port=8443
server.http.port=8080
spring.http.multipart.maxFileSize=20MB
spring.http.multipart.maxRequestSize=20MB
multipart.maxFileSize=20MB
multipart.maxRequestSize=20MB
# Thymeleaf Settings
spring.thymeleaf.cache=false
# SSL Settings
security.require-ssl=true
server.ssl.key-store=classpath:sample.jks
server.ssl.key-store-password=secret
server.ssl.key-password=password
@ -25,12 +24,12 @@ spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFact
spring.datasource.url=jdbc:postgresql://localhost:5432/ng-tracker
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.driverclassName=org.postgresql.Driver
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
# Liquibase Settings
liquibase.drop-first=false
liquibase.enabled=true
liquibase.change-log=classpath:db/changelog-master.xml
spring.liquibase.change-log=classpath:db/changelog-master.xml
spring.liquibase.drop-first=false
spring.liquibase.enabled=true
# Application Settings
ng-tracker.base-url=http://127.0.0.1:8080
ng-tracker.undead-user-login=admin

View File

@ -0,0 +1,10 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet author="orion" id="20190423_100000-1">
<addColumn tableName="hibernate_sequences">
<column name="next_val" type="bigint"/>
</addColumn>
</changeSet>
</databaseChangeLog>

View File

@ -2,11 +2,11 @@
padding-right: 0px;
}
.form-deadline-date{
.form-deadline-date {
padding-right: 3px;
}
.div-deadline-description{
.div-deadline-description {
padding-left: 5px;
padding-right: 5px;
}

View File

@ -83,10 +83,10 @@
margin-right: 4px;
margin-bottom: 4px;
font-size: 75%;
font-weight: 700;
line-height: 1.5;
color: #fff;
font-size: 75%;
font-weight: 700;
line-height: 1.5;
color: #fff;
}
.tag-name span[data-role="remove"] {

View File

@ -1,37 +1,37 @@
/*<![CDATA[*/
$(document).ready(function () {
$("#tags .tag .tag-name input[type=text]").each(function() {
$(this).attr("size", $(this).val().length)
});
$("#task-form").keydown(function(event){
if(event.keyCode == 13) {
event.preventDefault();
return false;
}
$("#tags .tag .tag-name input[type=text]").each(function () {
$(this).attr("size", $(this).val().length)
});
function removeTag () {
$(this).parent().parent().remove();
$("#task-form").keydown(function (event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
function removeTag() {
$(this).parent().parent().remove();
}
$("#input-tag").keyup(function (event) {
if(event.keyCode == 13 || event.keyCode == 188) {
if (event.keyCode == 13 || event.keyCode == 188) {
var tagNumber = $("#tags .tag").length;
var tagName = $.trim($(this).val());
var addTag = true;
// проверка, добавлен ли этот тег
$("#tags .tag .tag-name input[type=text]").each(function() {
if(tagName === $(this).val()) {
addTag = false;
return;
}
});
$("#tags .tag .tag-name input[type=text]").each(function () {
if (tagName === $(this).val()) {
addTag = false;
return;
}
});
// если тег не добавлен
if(addTag) {
if (addTag) {
// контейнер тега
var newTagRow = $("<div/>")
.attr("id", 'tags' + tagNumber)

View File

@ -2,7 +2,7 @@
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,28 +1,28 @@
<!DOCTYPE html>
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
<head>
</head>
<body>
<div class="container" layout:fragment="content">
<section id="commits">
<div class="container">
<div id="commits-tab">
</div>
</div>
</section>
</div>
<th:block layout:fragment="scripts">
<script th:inline="javascript">
/*<![CDATA[*/
$(document).ready(function () {
new OdinTableWithMeta("commits-tab", urlCommits);
});
/*]]>*/
</script>
</th:block>
</body>
<!DOCTYPE html>
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{default}">
<head>
</head>
<body>
<div class="container" layout:fragment="content">
<section id="commits">
<div class="container">
<div id="commits-tab">
</div>
</div>
</section>
</div>
<th:block layout:fragment="scripts">
<script th:inline="javascript">
/*<![CDATA[*/
$(document).ready(function () {
new OdinTableWithMeta("commits-tab", urlCommits);
});
/*]]>*/
</script>
</th:block>
</body>
</html>

View File

@ -2,7 +2,7 @@
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -2,7 +2,7 @@
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="">
layout:decorate="~{default}" xmlns:th="">
<head>
<link rel="stylesheet" type="text/css" href="../css/conference.css"/>
</head>

View File

@ -61,8 +61,14 @@
<li class="nav-item">
<a class="nav-link js-scroll-trigger" target="_blank" href="https://kias.rfbr.ru/">КИАС РФФИ</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/logout">Выход</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Профиль
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="/profile/profile">Личный кабинет</a>
<a class="dropdown-item" href="/logout">Выход</a>
</div>
</li>
</ul>
</div>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml">
layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="">
layout:decorate="~{default}" xmlns:th="">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml">
layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml">
layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
<link rel="stylesheet" href="../css/paper.css"/>
</head>
@ -95,7 +95,7 @@
th:onclick="|$('#deadlines${rowStat.index}\\.description').val('');
$('#deadlines${rowStat.index}\\.date').val('');
$('#addDeadline').click();|"><span
aria-hidden="true"><i class="fa fa-times"/></span>
aria-hidden="true"><i class="fa fa-times"></i></span>
</a>
</div>
</div>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default" xmlns:th="">
layout:decorate="~{default}" xmlns:th="">
<head>
</head>
<body>

View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{default}" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<body>
<div class="container" layout:fragment="content">
<section id="ewrq">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading text-uppercase">Личный кабинет</h2>
</div>
</div>
<hr/>
<div class="row">
<div class="col-lg-12">
<form id="profile-form" method="post" th:action="@{'/api/1.0/users/change-information'}"
th:object="${userDto}">
<input type="hidden" name="id" th:field="*{id}"/>
<div class="form-group">
<label for="firstName">Имя:</label>
<input class="form-control" id="firstName" type="text"
placeholder="Имя"
th:field="*{firstName}"/>
<p th:if="${#fields.hasErrors('firstName')}" th:errors="*{firstName}"
class="alert alert-danger">Incorrect firstName</p>
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<label for="lastName">Фамилия:</label>
<input class="form-control" id="lastName" type="text"
placeholder="lastName"
th:field="*{lastName}"/>
<p th:if="${#fields.hasErrors('lastName')}" th:errors="*{lastName}"
class="alert alert-danger">Incorrect lastName</p>
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input class="form-control" id="email" type="text"
placeholder="Email"
th:field="*{email}"/>
<p th:if="${#fields.hasErrors('email')}" th:errors="*{email}"
class="alert alert-danger">Incorrect email</p>
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<label for="login">login:</label>
<input class="form-control" id="login" type="text"
placeholder="login"
th:field="*{login}"/>
<p th:if="${#fields.hasErrors('login')}" th:errors="*{login}"
class="alert alert-danger">Incorrect login</p>
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<button id="sendMessageButton" name="save"
class="btn btn-success text-uppercase"
type="submit">
Сохранить
</button>
</div>
</form>
</div>
</div>
</div>
</section>
</div>
</body>
</html>

View File

@ -2,7 +2,7 @@
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -2,7 +2,7 @@
<html lang="en"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="default">
layout:decorate="~{default}">
<head>
</head>
<body>