mirror of
https://github.com/Airsonic-Pulse/airsonic-pulse.git
synced 2026-07-09 21:18:27 +00:00
Upgrade to Spring Boot 2.2.0
This commit is contained in:
parent
ea7234daf9
commit
006324a282
19 changed files with 121 additions and 128 deletions
|
|
@ -58,6 +58,10 @@
|
|||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-jmx</artifactId>
|
||||
</dependency>
|
||||
<!-- END Metrics -->
|
||||
|
||||
<!-- Spring -->
|
||||
|
|
@ -72,9 +76,9 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<groupId>jakarta.servlet.jsp</groupId>
|
||||
<artifactId>jakarta.servlet.jsp-api</artifactId>
|
||||
<version>2.3.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -153,7 +157,7 @@
|
|||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.3.3</version>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
@ -191,7 +195,7 @@
|
|||
<groupId>org.checkerframework</groupId>
|
||||
<artifactId>checker-qual</artifactId>
|
||||
<scope>compile</scope>
|
||||
<version>2.5.2</version>
|
||||
<version>2.8.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
@ -205,9 +209,9 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>hsqldb</groupId>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>1.8.0.7</version>
|
||||
<version>1.8.0.10</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -271,18 +275,19 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.persistence</groupId>
|
||||
<artifactId>org.eclipse.persistence.moxy</artifactId>
|
||||
<version>2.7.3</version>
|
||||
<version>2.7.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<groupId>org.glassfish.web</groupId>
|
||||
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
|
||||
<version>1.2.6</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -293,8 +298,8 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>javax.mail-api</artifactId>
|
||||
<groupId>jakarta.mail</groupId>
|
||||
<artifactId>jakarta.mail-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
@ -477,8 +482,8 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
@ -530,52 +535,37 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<artifactId>jakarta.mail</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
<artifactId>jaxws-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<scope>compile</scope>
|
||||
<groupId>jakarta.xml.ws</groupId>
|
||||
<artifactId>jakarta.xml.ws-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.5</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.43</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@ package org.airsonic.player;
|
|||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
|
||||
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
|
@ -17,7 +18,7 @@ import java.lang.reflect.Method;
|
|||
JmxAutoConfiguration.class,
|
||||
MultipartAutoConfiguration.class // TODO: update to use spring boot builtin multipart support
|
||||
})
|
||||
public class Application extends SpringBootServletInitializer implements EmbeddedServletContainerCustomizer {
|
||||
public class Application extends SpringBootServletInitializer implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Application.class);
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ public class Application extends SpringBootServletInitializer implements Embedde
|
|||
// Customize the application or call application.sources(...) to add sources
|
||||
// Since our example is itself a @Configuration class (via @SpringBootApplication)
|
||||
// we actually don't need to override this method.
|
||||
return application.sources(Application.class).web(true);
|
||||
return application.sources(Application.class).web(WebApplicationType.SERVLET);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -34,7 +35,7 @@ public class Application extends SpringBootServletInitializer implements Embedde
|
|||
}
|
||||
|
||||
@Override
|
||||
public void customize(ConfigurableEmbeddedServletContainer container) {
|
||||
public void customize(ConfigurableServletWebServerFactory container) {
|
||||
LOG.trace("Servlet container is {}", container.getClass().getCanonicalName());
|
||||
// Yes, there is a good reason we do this.
|
||||
// We cannot count on the tomcat classes being on the classpath which will
|
||||
|
|
@ -42,7 +43,7 @@ public class Application extends SpringBootServletInitializer implements Embedde
|
|||
// ensure this class does not have any direct dependencies on any Tomcat
|
||||
// specific classes.
|
||||
try {
|
||||
Class<?> tomcatESCF = Class.forName("org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory");
|
||||
Class<?> tomcatESCF = Class.forName("org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory");
|
||||
if (tomcatESCF.isInstance(container)) {
|
||||
LOG.info("Detected Tomcat web server");
|
||||
LOG.debug("Attempting to optimize tomcat");
|
||||
|
|
@ -61,7 +62,7 @@ public class Application extends SpringBootServletInitializer implements Embedde
|
|||
}
|
||||
|
||||
try {
|
||||
Class<?> jettyESCF = Class.forName("org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory");
|
||||
Class<?> jettyESCF = Class.forName("org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory");
|
||||
if (jettyESCF.isInstance(container)) {
|
||||
LOG.warn("Detected Jetty web server. Here there be dragons.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,13 @@ import org.apache.catalina.Container;
|
|||
import org.apache.catalina.Wrapper;
|
||||
import org.apache.catalina.webresources.StandardRoot;
|
||||
import org.apache.tomcat.util.scan.StandardJarScanFilter;
|
||||
import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer;
|
||||
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
|
||||
public class TomcatApplication {
|
||||
|
||||
public static void configure(TomcatEmbeddedServletContainerFactory tomcatFactory) {
|
||||
public static void configure(TomcatServletWebServerFactory tomcatFactory) {
|
||||
|
||||
tomcatFactory.addContextCustomizers((TomcatContextCustomizer) context -> {
|
||||
tomcatFactory.addContextCustomizers(context -> {
|
||||
|
||||
StandardJarScanFilter standardJarScanFilter = new StandardJarScanFilter();
|
||||
standardJarScanFilter.setTldScan("dwr-*.jar,jstl-*.jar,spring-security-taglibs-*.jar,spring-web-*.jar,spring-webmvc-*.jar,string-*.jar,taglibs-standard-impl-*.jar,tomcat-annotations-api-*.jar,tomcat-embed-jasper-*.jar");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package org.airsonic.player.monitor;
|
||||
|
||||
import com.codahale.metrics.JmxReporter;
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import com.codahale.metrics.jmx.JmxReporter;
|
||||
import org.airsonic.player.service.ApacheCommonsConfigurationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,10 @@ import org.springframework.context.annotation.Bean;
|
|||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter;
|
||||
import org.springframework.security.config.annotation.authentication.configuration.GlobalAuthenticationConfigurerAdapter;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
|
|
@ -25,7 +26,7 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
|||
import java.security.SecureRandom;
|
||||
|
||||
@Configuration
|
||||
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
|
||||
@Order(SecurityProperties.BASIC_AUTH_ORDER - 2)
|
||||
@EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true)
|
||||
public class GlobalSecurityConfig extends GlobalAuthenticationConfigurerAdapter {
|
||||
|
||||
|
|
@ -80,6 +81,7 @@ public class GlobalSecurityConfig extends GlobalAuthenticationConfigurerAdapter
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@Order(1)
|
||||
public class ExtSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
|
|
@ -115,6 +117,7 @@ public class GlobalSecurityConfig extends GlobalAuthenticationConfigurerAdapter
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
@Order(2)
|
||||
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class SecurityService implements UserDetailsService {
|
|||
|
||||
return new org.springframework.security.core.userdetails.User(
|
||||
username,
|
||||
user.getPassword(),
|
||||
"{noop}" + user.getPassword(),
|
||||
!user.isLdapAuthenticated(),
|
||||
true,
|
||||
true,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import liquibase.integration.spring.SpringLiquibase;
|
|||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.util.Util;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package org.airsonic.player.spring;
|
|||
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
import org.springframework.boot.context.logging.LoggingApplicationListener;
|
||||
import org.springframework.boot.logging.LogFile;
|
||||
import org.springframework.boot.logging.LoggingApplicationListener;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.env.MapPropertySource;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
import org.springframework.web.servlet.ViewResolver;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
|
||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
import org.springframework.web.servlet.view.JstlView;
|
||||
|
|
@ -26,7 +26,7 @@ import java.util.Properties;
|
|||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
public class ServletConfiguration extends WebMvcConfigurerAdapter {
|
||||
public class ServletConfiguration implements WebMvcConfigurer {
|
||||
/**
|
||||
* Registers the DWR servlet.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import org.airsonic.player.util.StringUtil;
|
|||
import org.junit.*;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.TestConfiguration;
|
||||
|
|
@ -37,7 +38,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@SpringBootTest(classes = AbstractAirsonicRestApiJukeboxIntTest.Config.class)
|
||||
@AutoConfigureMockMvc
|
||||
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
|
||||
public abstract class AbstractAirsonicRestApiJukeboxIntTest {
|
||||
|
|
@ -47,16 +48,22 @@ public abstract class AbstractAirsonicRestApiJukeboxIntTest {
|
|||
|
||||
@TestConfiguration
|
||||
static class Config {
|
||||
private static class SpiedPlayerDaoPlayQueueFactory extends PlayerDaoPlayQueueFactory {
|
||||
@Override
|
||||
public PlayQueue createPlayQueue() {
|
||||
return spy(super.createPlayQueue());
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PlayerDaoPlayQueueFactory playerDaoPlayQueueFactory() {
|
||||
return new SpiedPlayerDaoPlayQueueFactory();
|
||||
public BeanPostProcessor convertToSpy() {
|
||||
return new BeanPostProcessor() {
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) {
|
||||
if (bean instanceof PlayerDaoPlayQueueFactory) {
|
||||
PlayerDaoPlayQueueFactory temp = (PlayerDaoPlayQueueFactory) spy(bean);
|
||||
|
||||
doReturn(spy(temp.createPlayQueue())).when(temp).createPlayQueue();
|
||||
|
||||
bean = temp;
|
||||
}
|
||||
|
||||
return bean;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +142,7 @@ public abstract class AbstractAirsonicRestApiJukeboxIntTest {
|
|||
public void setup() throws Exception {
|
||||
populateDatabase();
|
||||
|
||||
testJukeboxPlayer = findTestJukeboxPlayer();
|
||||
testJukeboxPlayer = spy(findTestJukeboxPlayer());
|
||||
assertThat(testJukeboxPlayer).isNotNull();
|
||||
reset(testJukeboxPlayer.getPlayQueue());
|
||||
testJukeboxPlayer.getPlayQueue().clear();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.*;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
|
|
@ -80,15 +80,11 @@ public class InternetRadioServiceTest {
|
|||
|
||||
// Prepare the mocked URL connection for the redirection to simple playlist
|
||||
HttpURLConnection mockURLConnectionMove = Mockito.mock(HttpURLConnection.class);
|
||||
InputStream mockURLInputStreamMove = new ByteArrayInputStream("".getBytes());
|
||||
doReturn(mockURLInputStreamMove).when(mockURLConnectionMove).getInputStream();
|
||||
doReturn(HttpURLConnection.HTTP_MOVED_PERM).when(mockURLConnectionMove).getResponseCode();
|
||||
doReturn(TEST_PLAYLIST_URL_2).when(mockURLConnectionMove).getHeaderField(eq("Location"));
|
||||
|
||||
// Prepare the mocked URL connection for the redirection loop
|
||||
HttpURLConnection mockURLConnectionMoveLoop = Mockito.mock(HttpURLConnection.class);
|
||||
InputStream mockURLInputStreamMoveLoop = new ByteArrayInputStream("".getBytes());
|
||||
doReturn(mockURLInputStreamMoveLoop).when(mockURLConnectionMoveLoop).getInputStream();
|
||||
doReturn(HttpURLConnection.HTTP_MOVED_PERM).when(mockURLConnectionMoveLoop).getResponseCode();
|
||||
doReturn(TEST_PLAYLIST_URL_MOVE_LOOP).when(mockURLConnectionMoveLoop).getHeaderField(eq("Location"));
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import org.mockito.ArgumentCaptor;
|
|||
import org.mockito.Captor;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import org.mockito.Captor;
|
|||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
|
@ -190,7 +190,7 @@ public class PlaylistServiceTestImport {
|
|||
|
||||
@Override
|
||||
public Object answer(InvocationOnMock invocationOnMock) {
|
||||
Playlist playlist = invocationOnMock.getArgumentAt(0, Playlist.class);
|
||||
Playlist playlist = invocationOnMock.getArgument(0);
|
||||
playlist.setId(id);
|
||||
return null;
|
||||
}
|
||||
|
|
@ -200,7 +200,7 @@ public class PlaylistServiceTestImport {
|
|||
|
||||
@Override
|
||||
public Object answer(InvocationOnMock invocationOnMock) {
|
||||
File file = invocationOnMock.getArgumentAt(0, File.class);
|
||||
File file = invocationOnMock.getArgument(0);
|
||||
MediaFile mediaFile = new MediaFile();
|
||||
mediaFile.setPath(file.getPath());
|
||||
return mediaFile;
|
||||
|
|
|
|||
|
|
@ -13,16 +13,16 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
<artifactId>jaxws-api</artifactId>
|
||||
<groupId>jakarta.xml.ws</groupId>
|
||||
<artifactId>jakarta.xml.ws-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.jws</groupId>
|
||||
<artifactId>javax.jws-api</artifactId>
|
||||
<groupId>jakarta.jws</groupId>
|
||||
<artifactId>jakarta.jws-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,12 @@
|
|||
<dependency>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-client</artifactId>
|
||||
<version>8.14.5</version>
|
||||
<version>8.16.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.inject</groupId>
|
||||
<artifactId>jersey-hk2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
@ -115,13 +120,11 @@
|
|||
<dependency>
|
||||
<groupId>org.xmlunit</groupId>
|
||||
<artifactId>xmlunit-core</artifactId>
|
||||
<version>2.6.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xmlunit</groupId>
|
||||
<artifactId>xmlunit-matchers</artifactId>
|
||||
<version>2.6.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
70
pom.xml
70
pom.xml
|
|
@ -83,26 +83,26 @@
|
|||
<!-- Import dependency management from Spring Boot -->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>1.5.22.RELEASE</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liquibase</groupId>
|
||||
<artifactId>liquibase-core</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<version>3.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Fix convergence issues -->
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>5.1</version>
|
||||
<version>7.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
|
|
@ -127,61 +127,55 @@
|
|||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>27.1-jre</version>
|
||||
<version>28.1-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jdt</groupId>
|
||||
<artifactId>ecj</artifactId>
|
||||
<version>3.14.0</version>
|
||||
<version>3.19.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.10.5</version>
|
||||
<version>1.10.7</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>1.3.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jvnet.staxex</groupId>
|
||||
<artifactId>stax-ex</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-core</artifactId>
|
||||
<version>2.3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.ws</groupId>
|
||||
<artifactId>jaxws-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.soap</groupId>
|
||||
<artifactId>javax.xml.soap-api</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<groupId>jakarta.xml.ws</groupId>
|
||||
<artifactId>jakarta.xml.ws-api</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.jws</groupId>
|
||||
<artifactId>javax.jws-api</artifactId>
|
||||
<version>1.1</version>
|
||||
<groupId>jakarta.xml.soap</groupId>
|
||||
<artifactId>jakarta.xml.soap-api</artifactId>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.jws</groupId>
|
||||
<artifactId>jakarta.jws-api</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
|
@ -192,12 +186,12 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<version>3.8.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
@ -226,7 +220,7 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
<version>3.2.3</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<archive>
|
||||
|
|
@ -290,7 +284,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<version>2.22.2</version>
|
||||
<configuration>
|
||||
<!-- #1186 Temporarily skip a test. -->
|
||||
<excludes>
|
||||
|
|
@ -356,7 +350,7 @@
|
|||
<ignoredUsedUndeclaredDependency>org.apache.tomcat.embed:tomcat-embed-el*</ignoredUsedUndeclaredDependency>
|
||||
</ignoredUsedUndeclaredDependencies>
|
||||
<ignoredUnusedDeclaredDependencies>
|
||||
<ignoredUnusedDeclaredDependency>com.sun.mail:javax.mail*</ignoredUnusedDeclaredDependency>
|
||||
<ignoredUnusedDeclaredDependency>com.sun.mail:jakarta.mail*</ignoredUnusedDeclaredDependency>
|
||||
<ignoredUnusedDeclaredDependency>org.seamless:seamless-http*</ignoredUnusedDeclaredDependency>
|
||||
<ignoredUnusedDeclaredDependency>taglibs:string:jar*</ignoredUnusedDeclaredDependency>
|
||||
<ignoredUnusedDeclaredDependency>org.seamless:seamless-http*</ignoredUnusedDeclaredDependency>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue