Is it possible to create aapliaction in grails that works the way: User login with password and login to apliaction (authentication with spring security and postgredb), then aplication geting url to mongodb database (one per user), and then I configre application to use this db (with working mongo maped domain class)
grails, mongodb - multiple dbs
481 views Asked by lukisp At
2
There are 2 answers
1
Abhishek Tripathi
On
Yes you can use Mongo and postgre both using following line of code in dataSource.groovy
development {
grails {
mongo {
host = "localhost"
username = ""
password = ""
databaseName = "schema_name"
}
}
dataSource_lookup {
dialect = 'org.hibernate.dialect.PostgreSQLDialect'
pooled = true
driverClassName = 'org.postgresql.Driver'
username = "postgres"
password = "admin"
dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:postgresql://localhost:5432/schama_name?prepareThreshold=5&socketTimeout=5400"
}
}
Related Questions in MONGODB
- MongoDb not connecting C#
- How do I link two models in mongoose?
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- On the server side, it returns undefined but on the client side, logs the values no problem
- Laravel: Using belongsToMany relationship with MongoDB
- What are some MERN projects that will grow me from junior dev to senior
- Save Interface in DB golang
- findOneAndUpdate not updating value in mongodb?
- Get Type Error when using .countDocuments with mongoDB
- Getting a Large Error Output When Calling MongoDB/Mongoose Functions Without an Error Message
- How to enter data in mongodb array at specific position such that if there is only 2 data in array and I want to insert at 5, then rest data is null
- using Python to insert_one to my mongo_db, How do I pass key values into a function?
- SSL Certificate Verification Error When Scraping Website and Inserting Data into MongoDB
- connect ECONNREFUSED 43.205.72.30:27017 while connecting to Atlas
- Vite is probably changing my import path. What should I do?
Related Questions in GRAILS
- Table UserRole not populated in Grails 6
- Grails run-app or grails compile is not working with 6..0.0( java 11 or 17)
- Hibernate OptimisticLocking(type = OptimisticLockType.DIRTY) not working
- HibernateOptimisticLockingFailureException in Groovy / Grails, how to proceed after recovry
- Grails with Spring Security: How do I keep a password history to prevent password reuse
- How can I configure a Grails application using the Spring Security Rest plugin to authenticate with Amazon Cognito
- Grails - Problem to Exclude a Filter from Specific Endpoints
- Why are my beans disabled onStartUp after upgrading to grails5?
- Getting error on upgrading mysql 8 with grails 2.4.3
- get XFF using angular
- how to compare to collections of map in groovy
- Grail/GORM Data Service @Query - Join with Multiple Conditions
- Build Grails project with specific environment
- Grails params in controller empty on too large post request
- Grails5 upgrade - hibernate now returning a hibernate proxy instead of actual object - why?
Related Questions in GRAILS-ORM
- Hibernate OptimisticLocking(type = OptimisticLockType.DIRTY) not working
- how can i read clickhouse's "with totals" row by gorm-clickhouse?
- generate model from database with multischema
- Grail/GORM Data Service @Query - Join with Multiple Conditions
- Grails5 upgrade - hibernate now returning a hibernate proxy instead of actual object - why?
- Spring @Transactional not applied for GORM methods in java
- what can i to cancel the gorm where
- Execute query with enum
- gorm AutoMigrate question for primarykey repeat
- Apply application.groovy in GORM standalone
- gorm randomly returned nil for a count query
- How to pass logs and visualize it as attribute in jaeger or other app
- how do I connect gorm postgres to grpc golang
- How does the type interface work with GORM?
- GORM standalone: get all Domain's constraints
Related Questions in GORM-MONGODB
- Version property missing when converting Domain to JSON
- Grails MongoDB plugin: Values in v:2 index key pattern cannot be of type bool
- Mapping of Dynamic fields in RestfulController POST (save) method
- Grails 3.1 - Can't find codec for domain class
- Grails update embedded object but no encoding password using spring security
- Grails MongoDB Dirty Checking Fails With Spring Security
- how to hook gorminstance api in grail 3.x
- IllegalStateException when trying to query a MongoDB domain class using Grails 2.3.7
- Grails 3 & relational domain mapping with Mongo
- Grails v3.1.4 specify encrypted password for mongodb connection
- Is there a replacement for GMongo in the Grails Gorm-MongoDB Plugin?
- Unable to save embedded objects in mongodb using gorm(typeMismatch error)
- Abstract domain class and tablePerHierarchy
- How to create mongodb collection without _id
- A component required a bean named 'dataSource_dbCreate' that could not be found
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
If I am not wrong, you are asking about possibility of saving data in two data stores(Mongodb and Postgredb). In Postgredb, you want to store Spring Security authentication data and other application data in Mongodb.
Yes, this is possible. My current project had similar requirements and we are using MySQL and MongoDb.