Skip to content

Commit e1b78b2

Browse files
committed
Initial Commit
1 parent 36a2cac commit e1b78b2

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
<version>2.2.6.RELEASE</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
11+
1112
<groupId>com.webservice.mobile.app</groupId>
1213
<artifactId>mobile-app-web-services</artifactId>
1314
<version>0.0.1-SNAPSHOT</version>
15+
<packaging>war</packaging>
1416
<name>mobile-app-web-services</name>
1517
<description>Demo project for Spring Boot</description>
1618

@@ -49,6 +51,12 @@
4951
<version>0.9.1</version>
5052
</dependency>
5153

54+
<dependency>
55+
<groupId>org.springframework.boot</groupId>
56+
<artifactId>spring-boot-starter-tomcat</artifactId>
57+
<scope>provided</scope>
58+
</dependency>
59+
5260
<dependency>
5361
<groupId>org.springframework.boot</groupId>
5462
<artifactId>spring-boot-starter-test</artifactId>

src/main/java/com/webservice/mobile/app/MobileAppWebServicesApplication.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@
33
import com.webservice.mobile.app.security.AppProperties;
44
import org.springframework.boot.SpringApplication;
55
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
import org.springframework.boot.builder.SpringApplicationBuilder;
7+
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
68
import org.springframework.context.annotation.Bean;
79
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
810

911
@SpringBootApplication
10-
public class MobileAppWebServicesApplication {
12+
public class MobileAppWebServicesApplication extends SpringBootServletInitializer {
1113

1214
public static void main(String[] args) {
1315

1416
SpringApplication.run(MobileAppWebServicesApplication.class, args);
1517
}
1618

19+
@Override
20+
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
21+
return builder.sources(MobileAppWebServicesApplication.class);
22+
}
23+
1724
@Bean
1825
public BCryptPasswordEncoder bCryptPasswordEncoder(){
1926
return new BCryptPasswordEncoder();

src/main/java/com/webservice/mobile/app/ui/controller/UserController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.util.List;
1818

1919
@RestController
20-
@RequestMapping("users") // http://localhost:8080/
20+
@RequestMapping("users") // http://localhost:8080/mobile-app-ws/users
2121
public class UserController {
2222

2323
@Autowired
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
#database admin
12
spring.datasource.username=raj
3+
#database pass
24
spring.datasource.password=raj
5+
#database url
36
spring.datasource.url=jdbc:mysql://localhost:3306/photo_app
7+
#hibernate
48
spring.jpa.hibernate.ddl-auto=update
9+
#token secret resource
510
tokenSecret = jf9i4jgu83nfl0;
11+
#root url
12+
server.servlet.context-path=/mobile-app-ws

0 commit comments

Comments
 (0)