Commit c1fa3b8d authored by Vijay Akula's avatar Vijay Akula

Added profiles for the application

parent 0615a923
......@@ -68,5 +68,6 @@ dependencies {
compile group: 'org.thymeleaf', name: 'thymeleaf-spring4', version: '2.1.5.RELEASE'
compile group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '1.4.0'
compile group: 'org.springframework.boot', name: 'spring-boot-devtools'
}
package com.nisum.myteam.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
@RestController
public class PropertyController {
@Value("${message}")
private String value1;
private HashMap<String, Object> configMap = new HashMap<>();
@RequestMapping(method = RequestMethod.GET,value = "message")
public HashMap<String, Object> getProperties() {
configMap.put("message", value1);
return configMap;
}
}
server.port=8080
server.context-path=/myTeam/
#Local Database configuration
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=mytime
quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? *
myTeamjob.frequency=10000
myteam.remoteFileTransfer.required=true
myteam.remote.directory=\\\C:\\Program Files (x86)\\eSSL\\eTimeTrackLite
myteam.attendance.fileName=eTimeTrackLite1.mdb
#Local configuration purpose
myteam.remote.connection=smb://MyTime:nisum@192.168.15.67/eTimeTrackLite/
myteam.localFile.directory=/home/nisum/Documents/
#Mail configuration
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=mytime.nisum@gmail.com
spring.mail.password=nisum@123
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
#Spring boot favicon related
spring.mvc.favicon.enabled = false
#MS SQL configuration
myTeam.data.mssqldb.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
myTeam.data.mssqldb.url=jdbc:sqlserver://10.3.45.218:1433;databaseName=smartiSCC
myTeam.data.mssqldb.username=sa
myTeam.data.mssqldb.password=admin@123
#email.leave.notification.template.name=thymeleaf/absentMailTemplate
#email.leave.notification.template.name=absentMailTemplate
email.leave.notification.template.file.path=email/absentMailTemplate.html
email.leave.notification.from=mytime.nisum@gmail.com
email.leave.notification.subject=Employee Leave Email Notification
#0 * * * * ?===>for every minute
#email.leave.notification.shift1.cron=00 30 23 * * 1-5
#email.leave.notification.shift2.cron=00 30 23 * * 1-5
#email.leave.notification.shift3.cron=00 30 23 * * 2-6
#email.leave.notification.shift4.cron=00 30 23 * * 1-5
#email.leave.notification.shift5.cron=00 30 23 * * 1-5
#spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/
#spring.thymeleaf.prefix=.html
#spring.thymeleaf.view-names:thymeleaf/*
spring.thymeleaf.view-names:thymeleaf/*
email.project.notification.template.file.path=email/projectMailTemplate.html
email.project.notification.from=mytime.nisum@gmail.com
email.project.notification.subject=Project EndDate Email Notification
email.project.notification.cron=00 00 15 * * 1-5
message=this is from development
\ No newline at end of file
server.port=8080
server.context-path=/myTeam/
#Production configuration
spring.data.mongodb.host=10.3.45.11
spring.data.mongodb.port=27017
spring.data.mongodb.database=mytimedb
spring.data.mongodb.username=mytime
spring.data.mongodb.password=nisum@123
quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? *
myTeamjob.frequency=10000
myteam.remoteFileTransfer.required=true
myteam.remote.directory=\\\C:\\Program Files (x86)\\eSSL\\eTimeTrackLite
myteam.attendance.fileName=eTimeTrackLite1.mdb
#Local configuration purpose
myteam.remote.connection=smb://MyTime:nisum@192.168.15.67/eTimeTrackLite/
myteam.localFile.directory=/home/nisum/Documents/
#Mail configuration
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=mytime.nisum@gmail.com
spring.mail.password=nisum@123
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
#Spring boot favicon related
spring.mvc.favicon.enabled = false
#MS SQL configuration
myTeam.data.mssqldb.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
myTeam.data.mssqldb.url=jdbc:sqlserver://10.3.45.218:1433;databaseName=smartiSCC
myTeam.data.mssqldb.username=sa
myTeam.data.mssqldb.password=admin@123
#email.leave.notification.template.name=thymeleaf/absentMailTemplate
#email.leave.notification.template.name=absentMailTemplate
email.leave.notification.template.file.path=email/absentMailTemplate.html
email.leave.notification.from=mytime.nisum@gmail.com
email.leave.notification.subject=Employee Leave Email Notification
#0 * * * * ?===>for every minute
email.leave.notification.shift1.cron=00 30 23 * * 1-5
email.leave.notification.shift2.cron=00 30 23 * * 1-5
email.leave.notification.shift3.cron=00 30 23 * * 2-6
email.leave.notification.shift4.cron=00 30 23 * * 1-5
email.leave.notification.shift5.cron=00 30 23 * * 1-5
#spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/
#spring.thymeleaf.prefix=.html
#spring.thymeleaf.view-names:thymeleaf/*
spring.thymeleaf.view-names:thymeleaf/*
email.project.notification.template.file.path=email/projectMailTemplate.html
email.project.notification.from=mytime.nisum@gmail.com
email.project.notification.subject=Project EndDate Email Notification
email.project.notification.cron=00 00 15 * * 1-5
message=this is from production
\ No newline at end of file
server.port=8080
server.context-path=/myTeam/
#QA Database configuration
spring.data.mongodb.host=10.3.45.12
spring.data.mongodb.port=27017
spring.data.mongodb.database=mytimedb
spring.data.mongodb.username=mytime
spring.data.mongodb.password=nisum@123
quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? *
myTeamjob.frequency=10000
myteam.remoteFileTransfer.required=true
myteam.remote.directory=\\\C:\\Program Files (x86)\\eSSL\\eTimeTrackLite
myteam.attendance.fileName=eTimeTrackLite1.mdb
#Local configuration purpose
myteam.remote.connection=smb://MyTime:nisum@192.168.15.67/eTimeTrackLite/
myteam.localFile.directory=/home/nisum/Documents/
#Mail configuration
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=mytime.nisum@gmail.com
spring.mail.password=nisum@123
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
#Spring boot favicon related
spring.mvc.favicon.enabled = false
#MS SQL configuration
myTeam.data.mssqldb.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
myTeam.data.mssqldb.url=jdbc:sqlserver://10.3.45.218:1433;databaseName=smartiSCC
myTeam.data.mssqldb.username=sa
myTeam.data.mssqldb.password=admin@123
#email.leave.notification.template.name=thymeleaf/absentMailTemplate
#email.leave.notification.template.name=absentMailTemplate
email.leave.notification.template.file.path=email/absentMailTemplate.html
email.leave.notification.from=mytime.nisum@gmail.com
email.leave.notification.subject=Employee Leave Email Notification
#0 * * * * ?===>for every minute
email.leave.notification.shift1.cron=00 30 23 * * 1-5
email.leave.notification.shift2.cron=00 30 23 * * 1-5
email.leave.notification.shift3.cron=00 30 23 * * 2-6
email.leave.notification.shift4.cron=00 30 23 * * 1-5
email.leave.notification.shift5.cron=00 30 23 * * 1-5
#spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/
#spring.thymeleaf.prefix=.html
#spring.thymeleaf.view-names:thymeleaf/*
spring.thymeleaf.view-names:thymeleaf/*
email.project.notification.template.file.path=email/projectMailTemplate.html
email.project.notification.from=mytime.nisum@gmail.com
email.project.notification.subject=Project EndDate Email Notification
email.project.notification.cron=00 00 15 * * 1-5
\ No newline at end of file
server.port=8080
server.context-path=/myTeam/
#Production configuration
#spring.data.mongodb.host=10.3.45.11
#spring.data.mongodb.port=27017
#spring.data.mongodb.database=mytimedb
#spring.data.mongodb.username=mytime
#spring.data.mongodb.password=nisum@123
#Local Database configuration
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=mytime
quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? *
myTeamjob.frequency=10000
......@@ -67,4 +62,8 @@ spring.thymeleaf.view-names:thymeleaf/*
email.project.notification.template.file.path=email/projectMailTemplate.html
email.project.notification.from=mytime.nisum@gmail.com
email.project.notification.subject=Project EndDate Email Notification
email.project.notification.cron=00 00 15 * * 1-5
\ No newline at end of file
email.project.notification.cron=00 00 15 * * 1-5
spring.profiles.active=development
message=this is from default configuration
\ No newline at end of file
......@@ -2,29 +2,56 @@
<configuration>
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<springProfile name="test,dev">
<springProfile name="development">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
<springProfile name="stage">
<springProfile name="qa">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
<springProfile name="prod">
<springProfile name="production">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
<!-- If no active profile is set-->
<springProfile name="default">
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M - %msg%n</pattern>
</springProfile>
</encoder>
</appender>
<springProfile name="test,stage,dev,default">
<springProfile name="default">
<root level="INFO">
<appender-ref ref="stdout" />
</root>
</springProfile>
<springProfile name="prod">
<springProfile name="development">
<root level="INFO">
<appender-ref ref="stdout" />
</root>
</springProfile>
<springProfile name="qa">
<root level="INFO">
<appender-ref ref="stdout" />
</root>
</springProfile>
<springProfile name="production">
<root level="DEBUG">
<appender-ref ref="stdout" />
</root>
</springProfile>
</configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment