123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- jar{
- enabled false
- }
- bootJar {
- enabled true
- }
- dependencies {
-
- implementation project(':smartcity-common')
- implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
- implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
- implementation 'org.springframework.boot:spring-boot-starter-web'
- implementation 'org.springframework.cloud:spring-cloud-starter-oauth2'
- implementation 'org.springframework.cloud:spring-cloud-starter-security'
- compile('mysql:mysql-connector-java')
-
-
- compile('com.alibaba:druid-spring-boot-starter:1.1.9')
-
- compile('com.github.pagehelper:pagehelper-spring-boot-starter:1.2.10')
-
- testImplementation('org.springframework.boot:spring-boot-starter-test') {
- exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
- }
- }
- test {
- useJUnitPlatform()
- }
- task deploy(dependsOn:bootJar){
- doLast {
- println 'deploy...'
- ssh.run {
- session(remotes.sitServer){
- put from: 'build/libs/smartcity-web.jar', into: '/opt/sit/smartcity-web'
- def result = execute '/opt/sit/stop-port.sh 8324'
- println result
- execute 'nohup java -jar /opt/sit/smartcity-web/smartcity-web.jar --spring.profiles.active=sit >/dev/null &'
- }
- }
- }
- }
|