Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM openjdk:8-jdk
ADD target/spring-boot-websocket-0.1.0.jar app.jar
ENTRYPOINT ["java","-jar","app.jar"]
EXPOSE 8080
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

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

@SpringBootApplication
public class SpringBootWebsocketApplication {
public class SpringBootWebsocketApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SpringBootWebsocketApplication.class);
}

public static void main(String[] args) {
SpringApplication.run(SpringBootWebsocketApplication.class, args);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.springbootwebsocket.controller;

import com.example.springbootwebsocket.model.User;
import org.springframework.web.bind.annotation.RequestMapping;

@org.springframework.web.bind.annotation.RestController
public class RestController {

@RequestMapping("/welcome")
public String toAdd(User user) {
return "welcome";
}
}
1 change: 0 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
server.port=8084
2 changes: 1 addition & 1 deletion src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h2>Talk With EveryOne</h2>
<table id="conversation" class="table table-striped">
<thead>
<tr>
<th>Message Log</th>
<th>Message Tab</th>
</tr>
</thead>
<tbody id="userinfo">
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/templates/welcome.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Welcome</title>
</head>
<body>
<h1><a href="">Welcome Screen..Successfully Deployed</a></h1>
</body>
</html>