Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-1158

External jars support Alpha

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • pack-0.4.0
    • Saga
    • None

    Description

      We can use loads external jars support multiple database types

      create libs directory in the  alpha-server-0.4.0-SNAPSHOT-exec.jar directory, copy  mysql-connector-java-8.0.15.jar to the libs directory And add config -Dloader.path=./libs to the command line, e.g.

       

      java -Dloader.path=./libs -jar alpha-server-0.4.0-SNAPSHOT-exec.jar \

      --spring.datasource.platform=mysql \

      --spring.datasource.dataSourceClassName=com.mysql.jdbc.Driver \

      --spring.datasource.url='jdbc:[mysql://0.0.0.0:3306/saga?useUnicode=true&characterEncoding=utf-8&autoReconnect=true'] \

      --spring.datasource.username=saga-user \

      --spring.datasource.password=saga-password \

      --spring.profiles.active=prd

       

      In order to external jars support need to use `ZIP` layout in maven plugin configuration, e.g

       

      <plugin>

      <groupId>org.springframework.boot</groupId>

      <artifactId>spring-boot-maven-plugin</artifactId>

      <configuration>

        <layout>ZIP</layout>

      </configuration>

      </plugin>

      Attachments

        Issue Links

          Activity

            People

              zhanglei Lei Zhang
              zhanglei Lei Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 72h
                  72h
                  Remaining:
                  Remaining Estimate - 71h 40m
                  71h 40m
                  Logged:
                  Remaining Estimate - 71h 40m
                  20m