Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies Updated (https://bit.ly/app-dependency-update) #25

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

dependencies {
def springVersion = "3.3.6"
def springVersion = "3.4.0"
def junitVersion = "5.11.3"
def jjwtVersion = "0.12.6"

Expand All @@ -25,12 +25,13 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-security:$springVersion"
implementation "org.springframework.boot:spring-boot-starter-data-jpa:$springVersion"
implementation "org.springframework.boot:spring-boot-starter-validation:$springVersion"
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'
implementation 'io.swagger.parser.v3:swagger-parser:2.1.24'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'ch.qos.logback:logback-classic:1.5.12'
implementation 'io.projectreactor.netty:reactor-netty:1.2.0'
implementation 'com.mailjet:mailjet-client:5.2.5'
implementation 'com.google.code.gson:gson:2.11.0'
implementation "io.jsonwebtoken:jjwt-api:$jjwtVersion"
runtimeOnly "io.jsonwebtoken:jjwt-impl:$jjwtVersion"
runtimeOnly "io.jsonwebtoken:jjwt-jackson:$jjwtVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public AuthenvServiceConnector(
}

private List<EnvDetails> getUserMgmtSvcEnvProperties() {
final String url = UriComponentsBuilder.fromHttpUrl(getPropertiesUrl).toUriString();
final String url = UriComponentsBuilder.fromUriString(getPropertiesUrl).toUriString();
final String credentials =
getSystemEnvProperty(ENV_AUTHENV_USERNAME)
+ ":"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppPermissionDto;
import user.management.system.app.model.dto.AppPermissionRequest;
Expand All @@ -35,7 +35,7 @@ public class AppPermissionControllerTest extends BaseTest {
private static AppUserDto appUserDtoWithPermission;
private static String bearerAuthCredentialsNoPermission;

@MockBean private AuditService auditService;
@MockitoBean private AuditService auditService;

@Autowired private AppPermissionRepository appPermissionRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppRoleRequest;
import user.management.system.app.model.dto.AppRoleResponse;
Expand All @@ -34,7 +34,7 @@ public class AppRoleControllerTest extends BaseTest {
private static AppUserDto appUserDtoWithPermission;
private static String bearerAuthCredentialsNoPermission;

@MockBean private AuditService auditService;
@MockitoBean private AuditService auditService;

@Autowired private AppRoleRepository appRoleRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppRolePermissionRequest;
import user.management.system.app.model.dto.AppRolePermissionResponse;
Expand All @@ -42,7 +42,7 @@ public class AppRolePermissionControllerTest extends BaseTest {
private static AppUserDto appUserDtoWithPermission;
private static String bearerAuthCredentialsNoPermission;

@MockBean private AuditService auditService;
@MockitoBean private AuditService auditService;

@Autowired private AppRolePermissionRepository appRolePermissionRepository;
@Autowired private AppRoleRepository appRoleRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import java.util.List;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;

public class AppTestControllerTest extends BaseTest {

@MockBean private CacheManager cacheManager;
@MockitoBean private CacheManager cacheManager;

@Test
public void testPingTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.mockito.ArgumentCaptor;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppTokenRequest;
import user.management.system.app.model.dto.AppUserDto;
Expand Down Expand Up @@ -56,9 +56,9 @@ public class AppUserBasicAuthControllerTest extends BaseTest {
private static AppsEntity appsEntity;
private static AppTokenEntity appTokenEntity;

@MockBean private AuditService auditService;
@MockBean private EmailService emailService;
@MockBean private ApplicationEventPublisher applicationEventPublisher;
@MockitoBean private AuditService auditService;
@MockitoBean private EmailService emailService;
@MockitoBean private ApplicationEventPublisher applicationEventPublisher;

@Autowired private AppUserRepository appUserRepository;
@Autowired private AppsAppUserRepository appsAppUserRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import org.mockito.ArgumentCaptor;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.util.CollectionUtils;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppUserDto;
Expand All @@ -42,8 +42,8 @@ public class AppUserControllerTest extends BaseTest {
private static String bearerAuthCredentialsNoPermission;
private static String bearerAuthCredentialsWithPermission;

@MockBean private AuditService auditService;
@MockBean private ApplicationEventPublisher applicationEventPublisher;
@MockitoBean private AuditService auditService;
@MockitoBean private ApplicationEventPublisher applicationEventPublisher;

@Autowired private AppUserRepository appUserRepository;
@Autowired private PasswordUtils passwordUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.connector.AuthenvServiceConnector;
import user.management.system.app.service.AuditService;
Expand All @@ -22,8 +22,8 @@ public class AppUserNoAuthControllerTest extends BaseTest {
private static final String REDIRECT_URL = "https://app-1-redirect-url.com/home/";
private static String encodedEmail;

@MockBean private AuditService auditService;
@MockBean private AuthenvServiceConnector authenvServiceConnector;
@MockitoBean private AuditService auditService;
@MockitoBean private AuthenvServiceConnector authenvServiceConnector;

@BeforeAll
static void setUpBeforeAll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppUserDto;
import user.management.system.app.model.dto.AppUserRoleRequest;
Expand All @@ -42,7 +42,7 @@ public class AppUserRoleControllerTest extends BaseTest {
private static AppUserDto appUserDtoWithPermission;
private static String bearerAuthCredentialsNoPermission;

@MockBean private AuditService auditService;
@MockitoBean private AuditService auditService;

@Autowired private AppUserRoleRepository appUserRoleRepository;
@Autowired private AppUserRepository appUserRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppUserDto;
import user.management.system.app.model.dto.AppsAppUserRequest;
Expand All @@ -38,7 +38,7 @@ public class AppsAppUserControllerTest extends BaseTest {
private static AppUserDto appUserDtoNoPermission;
private static AppUserDto appUserDtoWithPermission;

@MockBean private AuditService auditService;
@MockitoBean private AuditService auditService;

@Autowired private AppsAppUserRepository appsAppUserRepository;
@Autowired private AppsRepository appsRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.dto.AppUserDto;
import user.management.system.app.model.dto.AppsRequest;
Expand All @@ -29,7 +29,7 @@ public class AppsControllerTest extends BaseTest {
private static AppUserDto appUserDtoNoPermission;
private static AppUserDto appUserDtoWithPermission;

@MockBean private AuditService auditService;
@MockitoBean private AuditService auditService;

@Autowired private AppsRepository appsRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.exception.ElementMissingException;
import user.management.system.app.exception.ElementNotFoundException;
Expand Down Expand Up @@ -54,7 +54,7 @@ public class AppUserServiceTest extends BaseTest {
private static UserUpdateEmailRequest userUpdateEmailRequest;
private static UserLoginRequest userLoginRequestForUpdatePassword;

@MockBean private ApplicationEventPublisher applicationEventPublisher;
@MockitoBean private ApplicationEventPublisher applicationEventPublisher;

@Autowired private AppUserService appUserService;
@Autowired private AppsAppUserRepository appsAppUserRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.entity.AppPermissionEntity;
import user.management.system.app.model.entity.AppRoleEntity;
Expand Down Expand Up @@ -54,10 +54,10 @@ public class AuditServiceTest extends BaseTest {

@Mock private HttpServletRequest request;
@Mock private SecurityContext securityContext;
@MockBean private AuditAppPermissionRepository auditAppPermissionRepository;
@MockBean private AuditAppRoleRepository auditAppRoleRepository;
@MockBean private AuditAppUserRepository auditAppUserRepository;
@MockBean private AuditAppsRepository auditAppsRepository;
@MockitoBean private AuditAppPermissionRepository auditAppPermissionRepository;
@MockitoBean private AuditAppRoleRepository auditAppRoleRepository;
@MockitoBean private AuditAppUserRepository auditAppUserRepository;
@MockitoBean private AuditAppsRepository auditAppsRepository;

@Autowired private AuditService auditService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import user.management.system.BaseTest;
import user.management.system.app.model.entity.AppUserEntity;
import user.management.system.app.model.entity.AppsEntity;
Expand All @@ -28,9 +28,9 @@

public class EmailServiceTest extends BaseTest {

@MockBean private FileReaderUtils fileReaderUtils;
@MockitoBean private FileReaderUtils fileReaderUtils;

@MockBean private MailjetClient mailjetClient;
@MockitoBean private MailjetClient mailjetClient;

@Autowired private EmailService emailService;

Expand Down