Browse Source

live Db added

master
mohammedThaqi 3 years ago
parent
commit
0e403bea1a
  1. 5
      src/main/java/com/gcc/communityHall/entity/ApplicationLogs.java
  2. 2
      src/main/java/com/gcc/communityHall/others/UserSession.java
  3. 8
      src/main/resources/application.properties

5
src/main/java/com/gcc/communityHall/entity/ApplicationLogs.java

@ -19,7 +19,7 @@ public class ApplicationLogs {
private String logType;
private int bookingId;
private int loginId = userSession.getUserId();
private int loginId =0;
private String comments;
@Column(name = "cdate",nullable = false, columnDefinition = "DATETIME DEFAULT CURRENT_TIMESTAMP")
@ -52,6 +52,9 @@ public class ApplicationLogs {
}
public int getLoginId() {
if( userSession.getUserId()!=0){
return userSession.getUserId();
}
return loginId;
}

2
src/main/java/com/gcc/communityHall/others/UserSession.java

@ -8,7 +8,7 @@ import org.springframework.web.context.WebApplicationContext;
@Component
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
public class UserSession {
private Integer userId;
private Integer userId =0 ;
private String userType;
private String dispayName;
private Long mobileno;

8
src/main/resources/application.properties

@ -1,8 +1,10 @@
spring.application.name=communityHall
spring.datasource.url=jdbc:mysql://localhost:3306/communityhall
spring.datasource.username=root
spring.datasource.password=root
#spring.datasource.url=jdbc:mysql://localhost:3306/communityhall
spring.datasource.url=jdbc:mysql://117.232.67.158:3306/communityhall
spring.datasource.username=cmh
spring.datasource.password=cmh
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL8Dialect

Loading…
Cancel
Save