实际工程实践

Spring boot 注册服务和多环境部署

2018-06-29  本文已影响20人  Cheava
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <executable>true</executable>
            </configuration>
        </plugin>
    </plugins>
</build>

web.jar 同目录下创建web.conf,内容:

JAVA_HOME=/opt/jdk1.8.0_171
JAVA_OPTS=-Xmx1024M 
LOG_FOLDER=/app/log/

web.jar 加执行权限
ln -s /app/web/web.jar /etc/init.d/web

系统添加在/etc/profile追加环境变量export SPRING_PROFILES_ACTIVE=test

spring.profiles.active=dev

上一篇 下一篇

猜你喜欢

热点阅读