This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.gitrebase; | |
import com.mongodb.ReadConcern; | |
import com.mongodb.ReadPreference; | |
import com.mongodb.TransactionOptions; | |
import com.mongodb.WriteConcern; | |
import com.mongodb.client.*; | |
import com.mongodb.client.model.Filters; | |
import com.mongodb.client.model.Updates; | |
import org.bson.Document; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.gitrebase; | |
import com.mongodb.ReadConcern; | |
import com.mongodb.ReadPreference; | |
import com.mongodb.TransactionOptions; | |
import com.mongodb.WriteConcern; | |
import com.mongodb.client.*; | |
import com.mongodb.client.model.Filters; | |
import com.mongodb.client.model.Updates; | |
import org.bson.Document; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.gitrebase; | |
import com.mongodb.client.*; | |
import com.mongodb.client.model.Filters; | |
import com.mongodb.client.model.Updates; | |
import org.bson.Document; | |
public class NonRepeatableRead { | |
private static final String DATABASE_NAME = "gitrebase"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.micrometer.observation.ObservationRegistry; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.ai.document.Document; | |
import org.springframework.ai.document.MetadataMode; | |
import org.springframework.ai.embedding.*; | |
import org.springframework.ai.embedding.observation.DefaultEmbeddingModelObservationConvention; | |
import org.springframework.ai.embedding.observation.EmbeddingModelObservationContext; | |
import org.springframework.ai.embedding.observation.EmbeddingModelObservationConvention; | |
import org.springframework.ai.embedding.observation.EmbeddingModelObservationDocumentation; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.beans.factory.annotation.Lookup; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class ReportGenerator { | |
public void run(IReport report) { | |
var contextHolder = getContextHolder(); | |
// some code dependent on context holder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jakarta.inject.Inject; | |
import jakarta.inject.Named; | |
import jakarta.inject.Provider; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class ReportGenerator { | |
private Provider<ContextHolder> contextHolderProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
@Scope(value = "prototype") | |
public class UserContextHolder extends ContextHolder { | |
} | |
@Component | |
@AllArgsConstructor | |
public class ReportGenerator { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.gitrebase.demo; | |
import lombok.AllArgsConstructor; | |
import lombok.Builder; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@Builder | |
@Data | |
@NoArgsConstructor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The tag here should match the Meteor version of your app, per .meteor/release | |
FROM geoffreybooth/meteor-base | |
# Copy app package.json and package-lock.json into container | |
COPY ./app/package*.json $APP_SOURCE_FOLDER/ | |
RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh | |
# Copy app source into container | |
COPY ./app $APP_SOURCE_FOLDER/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing nodejs using nvm | |
# Download script from git | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
# Execute script & insatall nvm | |
. ~/.nvm/nvm.sh | |
# List remote versiobn |
NewerOlder