Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaprasadreddy committed Apr 23, 2023
1 parent e3e4188 commit d14ea6c
Show file tree
Hide file tree
Showing 80 changed files with 173 additions and 59 deletions.
14 changes: 7 additions & 7 deletions application/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
plugins {
id "java"
id "jacoco"
id "org.springframework.boot" version "3.0.4"
id "org.springframework.boot" version "3.0.6"
id "io.spring.dependency-management" version "1.1.0"
id "com.gorylenko.gradle-git-properties" version "2.4.1"
id "com.google.cloud.tools.jib" version "3.3.1"
id "com.diffplug.spotless" version "6.15.0"
id "org.sonarqube" version "3.5.0.2730"
id "com.diffplug.spotless" version "6.18.0"
id "org.sonarqube" version "4.0.0.2929"
}

group = "com.sivalabs"
Expand Down Expand Up @@ -46,17 +46,17 @@ repositories {

ext {
set("spring_cloud_version", "2022.0.2")
set("testcontainers_version", "1.17.6")
set("testcontainers_version", "1.18.0")
set("webjars_locator_version", "0.46")
set("bootstrap_version", "5.2.3")
set("jquery_version", "3.6.4")
set("font_awesome_version", "6.3.0")
set("font_awesome_version", "6.4.0")
set("commons_lang_version", "3.12.0")
set("commons_io_version", "2.11.0")
set("springdoc_openapi", "1.6.15")
set("springdoc_openapi", "1.7.0")
set("opencsv_version", "5.7.1")
set("jsoup_version", "1.15.4")
set("datasource_proxy_version", "1.8.1")
set("datasource_proxy_version", "1.9.0")
set("archunit_junit5_version", "1.0.1")
set("rssreader_version", "3.4.4")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.sivalabs.devzone;

import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@ConfigurationProperties(prefix = "devzone")
public record ApplicationProperties(boolean importDataEnabled, List<String> importFilePaths) {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.sivalabs.devzone.common.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

import org.springframework.data.domain.Page;

import java.util.List;

public class PagedResult<T> {
private List<T> data;
private long totalElements;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.micrometer.core.aop.TimedAspect;
import io.micrometer.core.instrument.MeterRegistry;

import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.sivalabs.devzone.config;

import com.sivalabs.devzone.config.argresolvers.CurrentUserArgumentResolver;
import java.util.List;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;
Expand All @@ -10,6 +10,8 @@
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
private final CurrentUserArgumentResolver currentUserArgumentResolver;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sivalabs.devzone.config;

import com.sivalabs.devzone.users.domain.model.RoleEnum;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.sivalabs.devzone.config.annotations;

import org.springframework.security.access.prepost.PreAuthorize;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.security.access.prepost.PreAuthorize;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.sivalabs.devzone.config.annotations;

import org.springframework.security.access.prepost.PreAuthorize;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.security.access.prepost.PreAuthorize;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.sivalabs.devzone.config.annotations.CurrentUser;
import com.sivalabs.devzone.security.SecurityService;
import java.lang.annotation.Annotation;

import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.stereotype.Component;
Expand All @@ -11,6 +11,8 @@
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;

import java.lang.annotation.Annotation;

@Component
public class CurrentUserArgumentResolver implements HandlerMethodArgumentResolver {
private final SecurityService securityService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import com.sivalabs.devzone.ApplicationProperties;
import com.sivalabs.devzone.posts.application.usecases.uploadposts.UploadPostsHandler;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Component
@Transactional
public class PostsDataInitializer implements CommandLineRunner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jakarta.persistence.PreUpdate;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotEmpty;

import java.time.LocalDateTime;

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sivalabs.devzone.posts.adapter.data.entity;

import com.sivalabs.devzone.users.adapter.data.entity.UserEntity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
Expand All @@ -13,6 +14,7 @@
import jakarta.persistence.PreUpdate;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotEmpty;

import java.time.LocalDateTime;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import com.sivalabs.devzone.posts.adapter.data.entity.CategoryEntity;
import com.sivalabs.devzone.posts.domain.model.Category;
import java.util.Set;

import org.springframework.stereotype.Component;

import java.util.Set;

@Component
public class CategoryMapper {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.sivalabs.devzone.posts.adapter.data.entity.PostEntity;
import com.sivalabs.devzone.posts.domain.model.Post;
import com.sivalabs.devzone.users.adapter.data.mapper.UserMapper;

import org.springframework.stereotype.Component;

@Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import com.sivalabs.devzone.posts.adapter.data.mapper.CategoryMapper;
import com.sivalabs.devzone.posts.application.data.repository.CategoryRepository;
import com.sivalabs.devzone.posts.domain.model.Category;
import java.util.List;

import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
@Transactional
class CategoryRepositoryImpl implements CategoryRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

import com.sivalabs.devzone.posts.adapter.data.entity.CategoryEntity;
import com.sivalabs.devzone.posts.domain.model.Category;
import java.util.List;
import java.util.Optional;

import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Optional;

interface JpaCategoryRepository extends JpaRepository<CategoryEntity, Long> {
Optional<CategoryEntity> findByName(String name);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sivalabs.devzone.posts.adapter.data.repository;

import com.sivalabs.devzone.users.adapter.data.entity.UserEntity;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sivalabs.devzone.posts.adapter.data.repository;

import com.sivalabs.devzone.posts.adapter.data.entity.PostEntity;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.sivalabs.devzone.posts.domain.model.Category;
import com.sivalabs.devzone.posts.domain.model.Post;
import com.sivalabs.devzone.users.adapter.data.entity.UserEntity;
import java.util.Optional;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
Expand All @@ -19,6 +19,8 @@
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Repository
@Transactional
class PostRepositoryImpl implements PostRepository {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sivalabs.devzone.posts.application.data.repository;

import com.sivalabs.devzone.posts.domain.model.Category;

import java.util.List;

public interface CategoryRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.sivalabs.devzone.common.model.PagedResult;
import com.sivalabs.devzone.posts.domain.model.Post;

import java.util.Optional;

public interface PostRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import com.sivalabs.devzone.posts.domain.model.Category;
import com.sivalabs.devzone.posts.domain.model.Post;
import com.sivalabs.devzone.users.domain.model.User;
import java.time.LocalDateTime;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;

@Service
@Transactional
public class CreatePostHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.sivalabs.devzone.posts.application.usecases.createpost;

import com.sivalabs.devzone.posts.domain.utils.JsoupUtils;

import jakarta.validation.constraints.NotEmpty;

import org.apache.commons.lang3.StringUtils;

public record CreatePostRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import com.sivalabs.devzone.common.model.PagedResult;
import com.sivalabs.devzone.posts.application.data.repository.PostRepository;
import com.sivalabs.devzone.posts.domain.model.Post;
import java.nio.charset.StandardCharsets;
import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.nio.charset.StandardCharsets;
import java.util.List;

@Service
@Transactional
public class DownloadPostsHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
import com.sivalabs.devzone.posts.application.data.repository.PostRepository;
import com.sivalabs.devzone.posts.domain.model.Category;
import com.sivalabs.devzone.posts.domain.model.Post;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class GetPostsHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import com.sivalabs.devzone.posts.domain.model.Post;
import com.sivalabs.devzone.security.SecurityService;
import com.sivalabs.devzone.users.domain.model.User;

import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.springframework.stereotype.Component;

@Component
public class PostDtoMapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import com.sivalabs.devzone.posts.application.data.repository.PostRepository;
import com.sivalabs.devzone.posts.domain.model.Category;
import com.sivalabs.devzone.posts.domain.model.Post;
import java.util.Optional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

@Service
@Transactional
public class UpdatePostHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.sivalabs.devzone.posts.application.usecases.updatepost;

import com.sivalabs.devzone.posts.domain.utils.JsoupUtils;

import jakarta.validation.constraints.NotEmpty;

import org.apache.commons.lang3.StringUtils;

public record UpdatePostRequest(
Expand Down
Loading

0 comments on commit d14ea6c

Please sign in to comment.