Skip to content

Commit

Permalink
Upgrade to Java 17 and Spring Boot 3
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxNeo committed Sep 9, 2023
1 parent 48be0bb commit d09e1d0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 26 deletions.
8 changes: 4 additions & 4 deletions externalwar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<version>3.1.3</version>
<relativePath />
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<developers>
Expand All @@ -39,13 +41,11 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<!-- Dependecy to convert to tomcat WAR -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
* @author Miguel Caceres This Spring Boot application runs on Tomcat
*/
@SpringBootApplication
public class ExternalwarApplication extends SpringBootServletInitializer {
public class ExternalwarApplication {

public static void main(String[] args) {
SpringApplication.run(ExternalwarApplication.class, args);
}

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return super.configure(builder);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package site.sample.externalwar;


import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

public class ServletInitializer extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(ExternalwarApplication.class);
}

}
1 change: 1 addition & 0 deletions externalwar/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server.port=8080

This file was deleted.

0 comments on commit d09e1d0

Please sign in to comment.