Skip to content

Commit

Permalink
fix: disable mongodb autoconfiguration (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
xzchaoo authored Dec 27, 2023
1 parent 16ea3c1 commit f8cd92d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
27 changes: 27 additions & 0 deletions scripts/deploy/build-and-replace-pod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e

pod=$1
if [ -z "$pod" ]; then
echo 'build-and-place-pod.sh <pod>'
exit 1
fi

cd `dirname $0`/../..

echo build fat jar ...
./scripts/all-in-one/build.sh
echo


echo stop app ...
kubectl -n holoinsight-server exec $pod -- bash -c 'sc stop app'
echo

echo copy app.jar into $pod
kubectl -n holoinsight-server cp ./server/all-in-one/all-in-one-bootstrap/target/holoinsight-server.jar $pod:/home/admin/app.jar
echo copy done

echo start app ...
kubectl -n holoinsight-server exec $pod -- bash -c 'sc start app'
echo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;

import io.holoinsight.server.common.ContextHolder;
Expand All @@ -20,8 +22,8 @@
*
* @author xzchaoo
*/
@SpringBootApplication(
exclude = {ElasticsearchRestClientAutoConfiguration.class, FlywayAutoConfiguration.class})
@SpringBootApplication(exclude = {ElasticsearchRestClientAutoConfiguration.class,
FlywayAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
public class HoloinsightAllInOneBootstrap {
public static void main(String[] args) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ spring:
username: holoinsight
password: holoinsight
driver-class-name: com.mysql.cj.jdbc.Driver
data:
mongodb:
uri: mongodb://holoinsight:holoinsight@127.0.0.1:27017/holoinsight?keepAlive=true&maxIdleTimeMS=1500000&maxWaitTime=120000&connectTimeout=10000&socketTimeout=10000&socketKeepAlive=true&retryWrites=true
jackson:
time-zone: Asia/Shanghai
date-format: yyyy-MM-dd HH:mm:ss
Expand Down

0 comments on commit f8cd92d

Please sign in to comment.