Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

add "Browse button" for add local cover #1784

Open
wants to merge 99 commits into
base: release-10.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
9e1600f
Bump version to 11.0.0-SNAPSHOT
fxthomas Apr 15, 2020
01c6399
Update Sonos wsdl file
jooola Nov 3, 2019
4b45622
Bump commons-lang3 from 3.9 to 3.10
dependabot-preview[bot] Apr 16, 2020
b6d4e71
Bump liquibase-core from 3.8.7 to 3.8.9
dependabot-preview[bot] Apr 16, 2020
0015777
Bump tomcat.version from 8.5.51 to 8.5.54
dependabot-preview[bot] Apr 16, 2020
583da80
Bump jetty-jspc-maven-plugin from 9.4.26.v20200117 to 9.4.28.v20200408
dependabot-preview[bot] Apr 15, 2020
453f002
Refactor transcoding/downsampling bitrate limits
eharris Jun 10, 2019
994c1d6
Removed separate audio downsampling
eharris Jun 18, 2019
88dfedd
Fixed integration tests for streamed files
eharris Jul 20, 2019
15e32c7
Bump lucene-core from 8.4.1 to 8.5.1
dependabot-preview[bot] Apr 17, 2020
a08a1e0
Bump lucene-analyzers-common from 8.4.1 to 8.5.1
fxthomas Apr 17, 2020
130c8eb
Bump Lucene index version to 19 following upgrade
fxthomas Apr 17, 2020
c312ceb
Bump xmlunit-core from 2.6.3 to 2.6.4
dependabot-preview[bot] Apr 15, 2020
c7b091b
Bump xmlunit-matchers from 2.6.3 to 2.6.4
fxthomas Apr 16, 2020
0af5601
Update core dependencies for Spring Boot 2.2
fxthomas Jan 1, 2020
4b750f1
Rename changed classes/methods for Spring Boot 2.2
fxthomas Jan 1, 2020
3e179b2
Security: Tweak bean order after name change in Spring Boot 2.2
fxthomas Jan 1, 2020
0a52b79
Security: Explicitly configure no-op password encoder
fxthomas Jan 1, 2020
884efc5
Config: Enable suffix path matching
fxthomas Jan 1, 2020
fd2627e
Test: Replace use of deprecated bean overriding
fxthomas Jan 1, 2020
723e599
Test: Disable unnecessary stubs for HttpURLConnection.getInputStream
fxthomas Jan 2, 2020
4f7722e
Contrib: Update systemd service for Spring Boot 2.2
fxthomas Jan 2, 2020
69c88b6
Add excludes for Javax modules still used by Apache CXF
fxthomas Jan 3, 2020
a155890
Replace deprecated WebMvcConfigurerAdapter by WebMvcConfigurer
fxthomas Jan 3, 2020
21e9c78
Add missing dependency for docker-client 8.16.0
fxthomas Feb 16, 2020
dbf99bb
Use correct Tomcat version
fxthomas Apr 5, 2020
746b58b
Bump spring-boot-dependencies from 2.2.4 to 2.2.6
fxthomas Apr 11, 2020
313a96a
Bump postgresql from 42.2.10 to 42.2.12
dependabot-preview[bot] Apr 17, 2020
f5b6411
Bump java-jwt from 3.10.0 to 3.10.2
dependabot-preview[bot] Apr 17, 2020
d3f7947
Bump dependency-check-maven from 5.3.0 to 5.3.2
dependabot-preview[bot] Apr 17, 2020
ba54226
Restore DLNA support class (reverts part of d6264630)
fxthomas Apr 17, 2020
896e8d8
Add UPnP/DLNA listen port option to Tomcat support class
fxthomas Apr 17, 2020
a31a3ef
Add warning about Cling issues in the pom
fxthomas Apr 17, 2020
942542a
Fix #1625
tesshucom Apr 17, 2020
b7f14b5
Update changelog for 10.6.0
fxthomas Apr 19, 2020
43c0aca
Update changelog for 10.6.1
fxthomas Apr 19, 2020
877fb9a
Change the default naming convention for podcasts
G-regL Apr 3, 2020
ddec0f0
removed some trailing whitespace
G-regL Apr 3, 2020
72b3fa8
Limit filename to 146 chars (150 with extension)
G-regL Apr 6, 2020
06ff7cd
Removed trim() for filename
G-regL Apr 6, 2020
c65fa16
update naming convention as per recommendations
G-regL Apr 19, 2020
1d4f308
Merge pull request #1453 from fxthomas/upgrade-spring-boot-2.2
fxthomas Apr 25, 2020
e3f92e7
Merge pull request #1627 from airsonic/dependabot/maven/org.apache.lu…
fxthomas Apr 25, 2020
95ba26e
Bump recaptchav2-java from 1.0.3 to 1.0.4
dependabot-preview[bot] Apr 23, 2020
5369f3e
Bump stax-ex from 1.8.2 to 1.8.3
dependabot-preview[bot] Apr 20, 2020
dc8ff6b
Bump maven-dependency-plugin from 3.1.1 to 3.1.2
dependabot-preview[bot] Apr 20, 2020
4407db2
Fix #1407: Playback doesn't start after adding tracks to an empty pla…
fxthomas Dec 5, 2019
1e5264f
Refactor playback fix so that it reuses existing functions
fxthomas Jan 9, 2020
aa65c21
Fix Last.FM scrobbling on AudioScrobbler API v1 (HTTPS not available)
fxthomas Apr 21, 2020
8fe890a
Fix path issue in internal diagnostics page on Windows
fxthomas Apr 22, 2020
ce1e1a9
Remove Cucumber (imports airsonic-advanced/airsonic-advanced#113)
fxthomas Apr 12, 2020
cc79fdd
Fix version to avoid Maven warnings
fxthomas Apr 12, 2020
8b9d8c0
Add missing hamcrest and jackson dependencies
fxthomas Apr 12, 2020
55f32fe
Add Maven options to skip surefire/failsafe
fxthomas Apr 12, 2020
032987d
Use correct directories for integration tests
fxthomas Apr 13, 2020
f3901cf
Write integration test outputs to target directory
fxthomas Apr 13, 2020
a18cd18
Automatically create music folder on host for Docker tests
fxthomas Apr 13, 2020
9b23fc4
Remove unsupported database config by env vars
fxthomas Apr 16, 2020
42e09e8
Fix UTF-8 detection on some systems using non-standard locales
fxthomas Apr 26, 2020
c5d248f
fix Jukebox API test under windows
Faeb35 Apr 25, 2020
872d0f3
Bump mariadb-java-client from 2.5.4 to 2.6.0
dependabot-preview[bot] Apr 23, 2020
8e21e84
Bump maven-antrun-plugin from 1.8 to 3.0.0
dependabot-preview[bot] Apr 20, 2020
6ab03e8
Temporarily update log4j dependency to fix CVE-2020-9488
fxthomas May 1, 2020
96e98cf
Update syntax following maven-antrun-plugin 3.0.0 upgrade
fxthomas May 1, 2020
da5ee3d
Bump spring-boot-maven-plugin from 1.5.20.RELEASE to 2.0.9.RELEASE
dependabot-preview[bot] Apr 27, 2020
9e09fb7
Bump spring-boot-maven-plugin from 2.0.9.RELEASE to 2.2.6.RELEASE
fxthomas May 1, 2020
f998be4
Bump tomcat.version from 9.0.33 to 9.0.34
dependabot-preview[bot] May 2, 2020
9293a26
Bump jackson.version from 2.10.3 to 2.11.0
dependabot-preview[bot] May 2, 2020
ea467ff
Update HSQLDB dependency.
harawata May 2, 2019
0de8e6f
In HSQLDB 2, 'all VARCHAR column type declaration require a size' by …
harawata May 2, 2019
4adc8d9
In HSQLDB 2, 'nulls appear before not-null values'. This behavior is …
harawata May 2, 2019
4d2ea0b
In HSQLDB 2, 'when two strings are compared, the shorter string is pa…
harawata May 2, 2019
e449d83
In HSQLDB 2, there are many system tables without 'SYSTEM' prefix.
harawata May 2, 2019
da56250
In HSQLDB 2, 'current' is now a reserved keyword and cannot be used a…
fxthomas Sep 21, 2019
81c23e4
Use connection pooling for embedded HSQLDB database as well
fxthomas Feb 28, 2019
0ffc0f2
Add logic for seamless HSQLDB upgrades
fxthomas Oct 16, 2019
e96cc6c
Remove useless autocommit from legacy dao helper
fxthomas Nov 3, 2019
ff7ded3
Fix path when creating database backups before version upgrades
fxthomas Dec 4, 2019
cbab143
Use PropertiesLoaderUtils when reading HSQLDB .properties file
fxthomas Dec 4, 2019
76b7b50
Only run HSQLDB upgrades when on the 'legacy' profile
fxthomas Dec 5, 2019
d5790be
Add some null-checks on calls to mediaFileService.getMediaFile()
Yetangitu May 2, 2020
069af69
use String.format("%tF") instead of "%tY-%tm-%td" to avoid java.util.…
Yetangitu May 3, 2020
5c71659
Update changelog for 10.6.2
fxthomas May 3, 2020
1c1e38c
Avoid useless bookmarks
Yetangitu May 3, 2020
ae8c8b0
Trailing whitespace...
Yetangitu May 3, 2020
e610dc6
Merge pull request #1345 from fxthomas/upgrade-hsqldb-to-2.x
fxthomas May 3, 2020
598a3b3
Merge pull request #1686 from Yetangitu/null-test-getmediafile
fxthomas May 8, 2020
ed8b342
Add release signing keys
fxthomas May 1, 2020
a453a44
Docker: Bump JRE from 8 to 11
fxthomas Apr 14, 2020
10c3cc4
Bump jaxb-runtime from 2.3.2 to 2.3.3
dependabot-preview[bot] May 4, 2020
804fbdc
Bump jakarta.xml.ws-api from 2.3.2 to 2.3.3
dependabot-preview[bot] May 4, 2020
eafc139
Bump jakarta.xml.soap-api from 1.4.1 to 1.4.2
dependabot-preview[bot] May 4, 2020
df3dbe6
Fix broken HTML in getting started text
sersorrel May 3, 2020
f930a8e
Bump jakarta.xml.bind-api from 2.3.2 to 2.3.3
dependabot-preview[bot] Apr 25, 2020
38f47ce
Bump Spring Boot from 2.2.6.RELEASE to 2.2.7.RELEASE
fxthomas May 17, 2020
99c2f27
Bump maven-assembly-plugin from 3.2.0 to 3.3.0
dependabot-preview[bot] May 4, 2020
8b28366
Document how to update the stable release used for version checks
fxthomas May 3, 2020
d982348
Remove git lfs
muff1nman Oct 7, 2020
5ccca05
Add a deprecation message.
jvoisin Aug 11, 2021
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
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,74 @@
# airsonic/airsonic
# -->

## v10.6.2 - 3 May 2020

### Fixes

* Last.fm scrobbling should be working again (#1655)
* Incomplete support for some platforms in the internal diagnostics page (#1641, #1664)

## v10.6.1 - 19 Apr 2020

### Fixes

* Fix issue with DLNA not working (#1634)
* Fix issue with scanning error on some media types (e.g. WAV) (#1626)

## v10.6.0 - 15 Apr 2020

### New features

* Support for sending scrobbling information to the "ListenBrainz" service has
been added (#1224)

* A new "More" link has been added to the "About" page, containing detailed
system diagnostic information. This page will help us diagnose issues more
easily in the future. (#1457)

* The default 'admin' user can now be deleted if another admin user is present
on the system, which can improve security by avoiding having a hardcoded
username always available. Features that require an admin user (namely,
automated playlist import) will use the first admin user in the database. (#1131)

* The play queue can now be toggled on/off with a button, which helps use
Airsonic on touch devices (tablets, ultrabooks). (#1539)

* An 'add to play queue' action has been added to playlist pages. (#1433)

### Fixes and updates

* External database drivers have been updated to more recent versions. In
particular, the MySQL driver now supports MySQL 8.0, and initial migrations
on PostgreSQL should work properly again. (#1452 and #1511)

* The seek support for transcoding has now been re-enabled again, now that
we're more confident that this works fine with the HTML5 player. (#1123)

* Accuracy of the "search" feature has been improved, with search now ranking
by artist (resp. album or song) name in the artists (resp. albums or songs)
category. (#1235)

* The systemd example file has been updated with a couple of changes related to
device/driver access. (#1406)

* DLNA support should now be exposed properly through Docker, which wasn't the
case before. (#1380)

* The tabs on the main page no longer auto-refresh at regular intervals.
Instead a "refresh" link is available to trigger a reload manually. (#1338 #1339 #1413)

### Others

* The dark theme has seen some tweaks.
* Fix harmless error message about missing "web.xml"
* Fix not to perform clean up during scan
* Change to new shuffle generator
* The `pt_BR` locale has been updated.
* Avoid exceptions if Lucene index is not ready on first startup
* Avoid exceptions if database is not ready and fully migrated on first startup
* A lot of dependency upgrades, as well as other fixes and optimizations

## v10.5.0 - 7 Nov 2019

**New index version. Scan will be triggered on startup**
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Airsonic
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/airsonic/airsonic.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/airsonic/airsonic/context:java)
[![codecov.io coverage](https://codecov.io/gh/airsonic/airsonic/branch/master/graph/badge.svg)](https://codecov.io/gh/airsonic/airsonic)

## Airsonic isn't maintained anymore, you should migrate to [airsonic-advanced](https://github.com/airsonic-advanced/airsonic-advanced) instead.

---

What is Airsonic?
-----------------

Expand Down
63 changes: 35 additions & 28 deletions airsonic-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.airsonic.player</groupId>
<artifactId>airsonic</artifactId>
<version>10.6.0-SNAPSHOT</version>
<version>11.0.0-SNAPSHOT</version>
</parent>

<properties>
Expand Down Expand Up @@ -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 -->
Expand All @@ -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>
Expand Down Expand Up @@ -102,7 +106,7 @@
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.10.0</version>
<version>3.10.2</version>
</dependency>
<dependency>
<groupId>org.springframework.ldap</groupId>
Expand Down Expand Up @@ -131,12 +135,12 @@
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>8.4.1</version>
<version>8.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>8.4.1</version>
<version>8.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
Expand Down Expand Up @@ -219,9 +223,9 @@
</dependency>

<dependency>
<groupId>hsqldb</groupId>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
<version>2.5.0</version>
<scope>runtime</scope>
</dependency>

Expand Down Expand Up @@ -289,8 +293,8 @@
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>

Expand All @@ -307,8 +311,8 @@
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -344,12 +348,16 @@
<dependency>
<groupId>org.fourthline.cling</groupId>
<artifactId>cling-core</artifactId>
<!-- Cling removed the org.fourthline.cling.transport.impl.apache package in 2.1, which is needed to make Cling work with Tomcat. -->
<!-- Don't upgrade this unless you can test UPnP/DLNA support properly! -->
<version>2.0.1</version>
</dependency>

<dependency>
<groupId>org.fourthline.cling</groupId>
<artifactId>cling-support</artifactId>
<!-- Cling removed the org.fourthline.cling.transport.impl.apache package in 2.1, which is needed to make Cling work with Tomcat. -->
<!-- Don't upgrade this unless you can test UPnP/DLNA support properly! -->
<version>2.0.1</version>
</dependency>

Expand All @@ -368,7 +376,7 @@
<dependency>
<groupId>de.triology.recaptchav2-java</groupId>
<artifactId>recaptchav2-java</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
</dependency>

<!-- SONOS API / WSDL SUPPORT -->
Expand Down Expand Up @@ -491,8 +499,8 @@
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -522,17 +530,17 @@
</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>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
Expand All @@ -542,13 +550,11 @@
<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.10</version>
<version>42.2.12</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand All @@ -560,12 +566,12 @@
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.5.4</version>
<version>2.6.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -598,7 +604,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.20.RELEASE</version>
<version>2.2.7.RELEASE</version>
<configuration>
<mainClass>org.airsonic.player.Application</mainClass>
<layout>WAR</layout>
Expand All @@ -615,6 +621,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>${surefire.skip}</skip>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
Expand Down Expand Up @@ -669,7 +676,7 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<version>9.4.26.v20200117</version>
<version>9.4.28.v20200408</version>
<executions>
<execution>
<id>jspc</id>
Expand Down
27 changes: 19 additions & 8 deletions airsonic-main/src/main/java/org/airsonic/player/Application.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
package org.airsonic.player;

import org.airsonic.player.filter.*;
import org.airsonic.player.util.LegacyHsqlUtil;
import org.directwebremoting.servlet.DwrServlet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
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.context.event.ApplicationPreparedEvent;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.util.ReflectionUtils;

Expand All @@ -31,7 +35,7 @@
DataSourceTransactionManagerAutoConfiguration.class,
MultipartAutoConfiguration.class, // TODO: update to use spring boot builtin multipart support
LiquibaseAutoConfiguration.class})
public class Application extends SpringBootServletInitializer implements EmbeddedServletContainerCustomizer {
public class Application extends SpringBootServletInitializer implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {

private static final Logger LOG = LoggerFactory.getLogger(Application.class);

Expand Down Expand Up @@ -162,10 +166,17 @@ public Filter noCacheFilter() {
}

private static SpringApplicationBuilder doConfigure(SpringApplicationBuilder application) {
// Handle HSQLDB database upgrades from 1.8 to 2.x before any beans are started.
application.application().addListeners((ApplicationListener<ApplicationPreparedEvent>) event -> {
if (event.getApplicationContext().getEnvironment().acceptsProfiles("legacy")) {
LegacyHsqlUtil.upgradeHsqldbDatabaseSafely();
}
});

// 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
Expand All @@ -174,15 +185,15 @@ protected SpringApplicationBuilder configure(SpringApplicationBuilder applicatio
}

@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
// happen if the war is deployed to another app server like Jetty. So, we
// 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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
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");
Expand Down
Loading