Skip to content

Commit

Permalink
Add Spring Boot 2 support
Browse files Browse the repository at this point in the history
Both Spring Boot 1.5 and Spring Boot 2 are supported.

Improvements on modules and structure: `togglz-spring-boot-starter`
module now combines:

* `togglz-spring-common-configurer`: support for common components
* `togglz-spring-boot1-configurer`: support for c 1.5 specific components
* `togglz-spring-boot2-configurer`: support for Spring Boot 2.x specific components

Spring boot specific modules are conditionally loaded by Spring Boot using
@ConditionalOnClass. For Spring Boot 1.x, we check for AbstractEndpoint
class and for Spring Boot 2, we check for Endpoint annotation class.

Those classes only exist in their versions, so they're ok to make
sure that we load the right AutoConfiguration classes.

Also, packages were renamed to ensure that they are not shared by
different modules (for Java 9 compatibility).

Fixes: #271
  • Loading branch information
ruifigueira committed Jun 1, 2018
1 parent 336251a commit f985080
Show file tree
Hide file tree
Showing 41 changed files with 1,511 additions and 507 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ script:
after_success:
- "bash .travis-sonatype-deploy.sh"
jdk:
- openjdk7
- openjdk8
notifications:
webhooks:
Expand Down
36 changes: 34 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
<osgi.bundles.version>2.5.0</osgi.bundles.version>

<spring.version>3.2.17.RELEASE</spring.version>

<project.root.basedir>${project.parent.basedir}</project.root.basedir>
</properties>

<build>
Expand Down Expand Up @@ -102,7 +104,7 @@
</goals>
<configuration>
<failOnWarnings>true</failOnWarnings>
<osgiProfilePath>${project.parent.basedir}/java6-server.profile</osgiProfilePath>
<osgiProfilePath>${project.root.basedir}/java6-server.profile</osgiProfilePath>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -157,6 +159,12 @@
<version>1.1.2.RELEASE</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>

</plugins>
</pluginManagement>

Expand All @@ -173,7 +181,7 @@
<module>spring-core</module>
<module>spring-web</module>
<module>spring-security</module>
<module>spring-boot-starter</module>
<module>spring-boot</module>
<module>deltaspike</module>
<module>shiro</module>
<module>jsf</module>
Expand Down Expand Up @@ -348,12 +356,36 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-spring-boot-common-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-spring-boot1-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-spring-boot2-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-spring-actuator-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.togglz</groupId>
<artifactId>togglz-deltaspike</artifactId>
Expand Down

This file was deleted.

Loading

0 comments on commit f985080

Please sign in to comment.