Refactor packages

This commit is contained in:
Anton Romanov 2025-01-30 16:46:27 +04:00
parent d36bdf6eca
commit 55ff385407
8 changed files with 13 additions and 9 deletions

View File

@ -9,7 +9,7 @@ package ru.ulstu.controller;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import ru.ulstu.news.NewsService; import ru.ulstu.news.service.NewsService;
@Controller @Controller
public class IndexController { public class IndexController {

View File

@ -9,7 +9,7 @@ import jakarta.persistence.Transient;
import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import ru.ulstu.model.BaseEntity; import ru.ulstu.model.BaseEntity;
import ru.ulstu.news.News; import ru.ulstu.news.model.News;
import java.util.Date; import java.util.Date;

View File

@ -5,8 +5,8 @@ import jakarta.validation.constraints.NotNull;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import ru.ulstu.news.News; import ru.ulstu.news.model.News;
import ru.ulstu.news.NewsService; import ru.ulstu.news.service.NewsService;
@Service @Service
public class MeetingService { public class MeetingService {

View File

@ -4,7 +4,7 @@
* *
*/ */
package ru.ulstu.news; package ru.ulstu.news.controller;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import ru.ulstu.model.OffsetablePageRequest; import ru.ulstu.model.OffsetablePageRequest;
import ru.ulstu.model.UserRoleConstants; import ru.ulstu.model.UserRoleConstants;
import ru.ulstu.news.model.News;
import ru.ulstu.news.service.NewsService;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;

View File

@ -1,4 +1,4 @@
package ru.ulstu.news; package ru.ulstu.news.model;
import jakarta.persistence.Entity; import jakarta.persistence.Entity;
import jakarta.persistence.Lob; import jakarta.persistence.Lob;

View File

@ -1,8 +1,9 @@
package ru.ulstu.news; package ru.ulstu.news.repository;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import ru.ulstu.news.model.News;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package ru.ulstu.news; package ru.ulstu.news.service;
import jakarta.transaction.Transactional; import jakarta.transaction.Transactional;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
@ -6,6 +6,8 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import ru.ulstu.meeting.Meeting; import ru.ulstu.meeting.Meeting;
import ru.ulstu.news.model.News;
import ru.ulstu.news.repository.NewsRepository;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;

View File

@ -45,6 +45,5 @@
th:text=${pageNumber} th:text=${pageNumber}
th:class="${pageNumber == news.number+1} ? active"></a> th:class="${pageNumber == news.number+1} ? active"></a>
</div> </div>
</div> </div>
</html> </html>