Skip to content

Commit fe4d2ce

Browse files
committed
Remove Servlet 2 Support
1 parent 9f81617 commit fe4d2ce

23 files changed

Lines changed: 1 addition & 677 deletions

docs/framework-spring_auto_reconfiguration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Spring Auto-reconfiguration Framework causes an application to be automatica
1313
</table>
1414
Tags are printed to standard output by the buildpack detect script
1515

16-
If a `/WEB-INF/web.xml` file exists, the framework will modify it in addition to making the auto-reconfiguration JAR available on the classpath. This modification consists of adding `org.cloudfoundry.reconfiguration.CloudProfileApplicationContextInitializer`, `org.cloudfoundry.reconfiguration.CloudPropertySourceApplicationContextInitializer`, and `org.cloudfoundry.reconfiguration.CloudServiceReconfigurationApplicationContextInitializer` to the collection of `contextInitializerClasses`. The Spring Auto-reconfiguration Framework also adds the `cloud` profile to any existing Spring profiles such as those defined in the [`SPRING_PROFILES_ACTIVE`][] environment variable.
16+
The Spring Auto-reconfiguration Framework adds the `cloud` profile to any existing Spring profiles such as those defined in the [`SPRING_PROFILES_ACTIVE`][] environment variable.
1717

1818
## Configuration
1919
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].

lib/java_buildpack/framework/spring_auto_reconfiguration.rb

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
require 'java_buildpack/component/versioned_dependency_component'
1717
require 'java_buildpack/logging/logger_factory'
1818
require 'java_buildpack/framework'
19-
require 'java_buildpack/framework/spring_auto_reconfiguration/web_xml_modifier'
2019

2120
module JavaBuildpack
2221
module Framework
@@ -37,8 +36,6 @@ def initialize(context)
3736
def compile
3837
download_jar
3938
@droplet.additional_libraries << (@droplet.sandbox + jar_name)
40-
41-
modify_web_xml
4239
end
4340

4441
# (see JavaBuildpack::Component::BaseComponent#release)
@@ -53,28 +50,6 @@ def supports?
5350
@configuration['enabled'] && (@droplet.root + '**/*spring-core*.jar').glob.any?
5451
end
5552

56-
private
57-
58-
def modify_web_xml
59-
web_xml = @droplet.root + 'WEB-INF/web.xml'
60-
61-
return unless web_xml.exist?
62-
63-
puts ' Modifying /WEB-INF/web.xml for Auto Reconfiguration'
64-
@logger.debug { " Original web.xml: #{web_xml.read}" }
65-
66-
modifier = web_xml.open { |file| WebXmlModifier.new(file) }
67-
modifier.augment_root_context
68-
modifier.augment_servlet_contexts
69-
70-
web_xml.open('w') do |file|
71-
file.write(modifier.to_s)
72-
file.fsync
73-
end
74-
75-
@logger.debug { " Modified web.xml: #{web_xml.read}" }
76-
end
77-
7853
end
7954

8055
end

lib/java_buildpack/framework/spring_auto_reconfiguration/web_xml_modifier.rb

Lines changed: 0 additions & 133 deletions
This file was deleted.

spec/fixtures/framework_auto_reconfiguration_servlet_2/WEB-INF/lib/spring-core-3.2.3.RELEASE.jar

Whitespace-only changes.

spec/fixtures/framework_auto_reconfiguration_servlet_2/WEB-INF/web.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

spec/fixtures/web_root_existing_params_after.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

spec/fixtures/web_root_existing_params_before.xml

Lines changed: 0 additions & 35 deletions
This file was deleted.

spec/fixtures/web_root_no_contextLoaderListener_after.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

spec/fixtures/web_root_no_contextLoaderListener_before.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

spec/fixtures/web_root_no_params_after.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)