File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
java/com/webservice/mobile/app Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 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
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 >
Original file line number Diff line number Diff line change 33import com .webservice .mobile .app .security .AppProperties ;
44import org .springframework .boot .SpringApplication ;
55import org .springframework .boot .autoconfigure .SpringBootApplication ;
6+ import org .springframework .boot .builder .SpringApplicationBuilder ;
7+ import org .springframework .boot .web .servlet .support .SpringBootServletInitializer ;
68import org .springframework .context .annotation .Bean ;
79import 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 ();
Original file line number Diff line number Diff line change 1717import java .util .List ;
1818
1919@ RestController
20- @ RequestMapping ("users" ) // http://localhost:8080/
20+ @ RequestMapping ("users" ) // http://localhost:8080/mobile-app-ws/users
2121public class UserController {
2222
2323 @ Autowired
Original file line number Diff line number Diff line change 1+ # database admin
12spring.datasource.username =raj
3+ # database pass
24spring.datasource.password =raj
5+ # database url
36spring.datasource.url =jdbc:mysql://localhost:3306/photo_app
7+ # hibernate
48spring.jpa.hibernate.ddl-auto =update
9+ # token secret resource
510tokenSecret = jf9i4jgu83nfl0;
11+ # root url
12+ server.servlet.context-path =/mobile-app-ws
You can’t perform that action at this time.
0 commit comments