Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
56643222
Commit
56643222
authored
Oct 15, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add simple war sample
parent
676ff75d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
0 deletions
+151
-0
pom.xml
spring-boot-samples/pom.xml
+1
-0
pom.xml
spring-boot-samples/spring-boot-sample-war/pom.xml
+86
-0
MyController.java
...oot-sample-war/src/main/java/sample/war/MyController.java
+30
-0
SampleWarApplication.java
...le-war/src/main/java/sample/war/SampleWarApplication.java
+33
-0
webapp.txt
...samples/spring-boot-sample-war/src/main/webapp/webapp.txt
+1
-0
No files found.
spring-boot-samples/pom.xml
View file @
56643222
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
<module>
spring-boot-sample-undertow
</module>
<module>
spring-boot-sample-undertow
</module>
<module>
spring-boot-sample-undertow-ssl
</module>
<module>
spring-boot-sample-undertow-ssl
</module>
<module>
spring-boot-sample-velocity
</module>
<module>
spring-boot-sample-velocity
</module>
<module>
spring-boot-sample-war
</module>
<module>
spring-boot-sample-web-freemarker
</module>
<module>
spring-boot-sample-web-freemarker
</module>
<module>
spring-boot-sample-web-groovy-templates
</module>
<module>
spring-boot-sample-web-groovy-templates
</module>
<module>
spring-boot-sample-web-method-security
</module>
<module>
spring-boot-sample-web-method-security
</module>
...
...
spring-boot-samples/spring-boot-sample-war/pom.xml
0 → 100644
View file @
56643222
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<!-- Your own application should inherit from spring-boot-starter-parent -->
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-samples
</artifactId>
<version>
1.2.7.BUILD-SNAPSHOT
</version>
</parent>
<artifactId>
spring-boot-sample-war
</artifactId>
<packaging>
war
</packaging>
<name>
Spring Boot War Sample
</name>
<description>
Spring Boot War Sample
</description>
<url>
http://projects.spring.io/spring-boot/
</url>
<organization>
<name>
Pivotal Software, Inc.
</name>
<url>
http://www.spring.io
</url>
</organization>
<properties>
<main.basedir>
${basedir}/../..
</main.basedir>
<m2eclipse.wtp.contextRoot>
/
</m2eclipse.wtp.contextRoot>
</properties>
<dependencies>
<!-- Compile -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
tomcat
</id>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<scope>
provided
</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>
jetty
</id>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jetty
</artifactId>
<scope>
provided
</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>
undertow
</id>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
<scope>
provided
</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
spring-boot-samples/spring-boot-sample-war/src/main/java/sample/war/MyController.java
0 → 100644
View file @
56643222
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
sample
.
war
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
MyController
{
@RequestMapping
(
"/"
)
public
String
hello
()
{
return
"Hello World!"
;
}
}
spring-boot-samples/spring-boot-sample-war/src/main/java/sample/war/SampleWarApplication.java
0 → 100644
View file @
56643222
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
sample
.
war
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.web.SpringBootServletInitializer
;
/**
* Sample WAR application
*/
@SpringBootApplication
public
class
SampleWarApplication
extends
SpringBootServletInitializer
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
SampleWarApplication
.
class
,
args
);
}
}
spring-boot-samples/spring-boot-sample-war/src/main/webapp/webapp.txt
0 → 100644
View file @
56643222
Hello WebApp
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment