Skip to content

Commit

Permalink
Upgrade to Spring Framework 5.3 / Boot 2.4 snapshots
Browse files Browse the repository at this point in the history
This commit also:
- Remove Spring Framework substitutions (see spring-projects/spring-framework#22968 (comment) for more details)
- Remove web-issue122 sample which seems not relevant anymore
- Remove Unnecessary classes and resource configuration from spring-petclinic-jdbc sample
- Upgrade to spring Fu 0.4.0-SNAPSHOT
- Migrate remaining tests to JUnit 5
- Remove java.lang.management.* from hints
- Rename OnlyPresent to OnlyIfPresent

See spring-atticgh-138
  • Loading branch information
sdeleuze committed Jun 24, 2020
1 parent 982d9ba commit c61bf50
Show file tree
Hide file tree
Showing 117 changed files with 281 additions and 2,561 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.3.1.RELEASE</version>
<version>2.4.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"com.fasterxml.jackson.databind.ObjectMapper",
"com.fasterxml.jackson.core.JsonGenerator",
"com.fasterxml.jackson.dataformat.smile.SmileFactory",
"com.google.protobuf.Message",
"org.synchronoss.cloud.nio.multipart.NioMultipartParser"
"com.google.protobuf.Message"
},
access=AccessBits.CLASS|AccessBits.DECLARED_CONSTRUCTORS
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@
"io.netty.channel.ChannelHandler",
"io.netty.util.concurrent.GenericFutureListener",
"io.netty.bootstrap.ServerBootstrap$1",
"io.netty.bootstrap.ServerBootstrap$ServerBootstrapAcceptor",
"java.lang.management.ManagementFactory",
"java.lang.management.RuntimeMXBean"},
"io.netty.bootstrap.ServerBootstrap$ServerBootstrapAcceptor"},
access=AccessBits.CLASS|AccessBits.DECLARED_CONSTRUCTORS|AccessBits.DECLARED_METHODS)
})
public class NettyHints implements NativeImageConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
{"class": "org.springframework.core.annotation.AnnotationFilter$1"},
{"class": "org.springframework.core.annotation.AnnotationFilter$2"},
{"class": "org.springframework.core.annotation.PackagesAnnotationFilter"},
{"class": "org.springframework.core.GraalDetector"},
{"class": "org.springframework.core.SerializableTypeWrapper"},
{"class": "org.springframework.core.SerializableTypeWrapper$SerializableTypeProxy"},
{"class": "org.springframework.format.annotation.DateTimeFormat$ISO"},
{"class": "org.springframework.http.HttpStatus"},
Expand All @@ -72,7 +72,25 @@
{"class": "org.springframework.util.unit.DataUnit"},
{"class": "org.springframework.util.unit.DataSize"},
{"class": "org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter"},
// To avoid XML parsers to be included
{"class": "org.springframework.core.DefaultParameterNameDiscoverer"},
{"class": "org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory"},
{"class": "org.springframework.context.annotation.ConfigurationClassPostProcessor"},
{"class": "org.springframework.context.annotation.ConfigurationClassEnhancer"},
{"class": "org.springframework.aop.framework.DefaultAopProxyFactory"},

// For SPEL removal
{"class": "org.springframework.context.support.AbstractApplicationContext" },
{"class": "org.springframework.core.SpringProperties" },
{"class": "org.springframework.context.event.EventListenerMethodProcessor" },

// For XML removal
{"class": "org.springframework.util.DefaultPropertiesPersister" },
{"class": "org.springframework.core.io.support.PropertiesLoaderUtils" },
{"class": "org.springframework.web.servlet.function.support.RouterFunctionMapping" },
{"class": "org.springframework.web.client.RestTemplate" },
{"class": "org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver" },
{"class": "org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport" },
{"class": "org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService" },
{"class": "org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration" },
{"class": "org.springframework.http.MediaType" },
{"class": "org.springframework.http.codec.support.BaseDefaultCodecs" },
Expand All @@ -82,12 +100,11 @@
{"class": "org.springframework.util.CollectionUtils" },
{"class": "org.springframework.util.LinkedCaseInsensitiveMap" },
{"class": "org.springframework.util.MimeType" },
{"class": "org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport" },
{"class": "org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService" },
{"class": "org.springframework.web.client.RestTemplate" },
{"class": "org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter" },
{"class": "org.springframework.beans.factory.xml.XmlBeanDefinitionReader" },
{"class": "org.springframework.util.ReflectionUtils" },
{"class": "org.springframework.beans.PropertyEditorRegistrySupport" },
{"class": "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter" },
{"class": "org.springframework.core.io.support.ResourcePropertiesPersister" },

// Spring Boot
{"class": "org.springframework.boot.CommandLineRunner"},
Expand All @@ -106,6 +123,9 @@
{"package": "org.jboss.logging"},
{"class": "org.slf4j.spi.LocationAwareLogger"},
{"class": "org.slf4j.Logger"},
{"class": "org.apache.commons.logging.LogAdapter"},
{"class": "org.apache.commons.logging.LogAdapter$1"},
{"class": "org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog"},

{"class": "org.slf4j.event.SubstituteLoggingEvent"},
{"class": "org.slf4j.event.EventRecodingLogger"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// vvv r2dbc
{"pattern": "\\QMETA-INF/services/io.r2dbc.spi.ConnectionFactoryProvider\\E"},
// vvv springmvc-tomcat
{"pattern": "org/springframework/web/servlet/DispatcherServlet.properties"},
{"pattern": "org/apache/catalina/startup/MimeTypeMappings.properties"},
// ^^^ springmvc-tomcat
// vvv vanilla-tx
Expand Down
10 changes: 6 additions & 4 deletions spring-graalvm-native-docs/src/main/asciidoc/options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ You can find more details in GraalVM https://github.com/oracle/graal/blob/master

* `-H:+RemoveSaturatedTypeFlows` reduces build time and decrease build memory consumption, especially for big projects.

=== Spring Framework/Boot options

* `-Dspring.xml.ignore=true` removes XML support from Spring Boot, enabling faster compilation and smaller executables.

* `-Dspring.spel.ignore=true` removes SpEL support from Spring Boot, enabling faster compilation and smaller executables.

=== Feature options

The current feature options are as follows:
Expand All @@ -57,10 +63,6 @@ will provide initialization and resource configuration but nothing more.

* `-Dspring.native.remove-yaml-support=true` removes Yaml support from Spring Boot, enabling faster compilation and smaller executables.

* `-Dspring.native.remove-xml-support=true` removes XML support from Spring Boot, enabling faster compilation and smaller executables.

* `-Dspring.native.remove-spel-support=true` removes SpEL support from Spring Boot, enabling faster compilation and smaller executables.

* `-Dspring.native.remove-jmx-support=true` removes JMX support from Spring Boot, enabling faster compilation and smaller executables.

* `-Dspring.native.dump-config=/tmp/dump.txt` dumps the configuration to the specified file.
Expand Down
117 changes: 55 additions & 62 deletions spring-graalvm-native-samples/actuator-webflux/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<version>2.4.0-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
Expand All @@ -31,13 +31,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
</exclusion>
</exclusions>

</dependency>

<dependency>
Expand Down Expand Up @@ -67,70 +60,70 @@
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-release</id>
<name>Spring release</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshot</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Milestone</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-release</id>
<name>Spring release</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshot</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Milestone</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-release</id>
<name>Spring release</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>spring-release</id>
<name>Spring release</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-snapshot</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>spring-snapshot</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestone</id>
<name>Spring Milestone</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>spring-milestone</id>
<name>Spring Milestone</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

Expand Down
Loading

0 comments on commit c61bf50

Please sign in to comment.