I used this 2 properties to connect mongodb. is there any way to do this without URI
spring.data.mongodb.uri=
spring.data.mongodb.database=
CodePudding user response:
in vs code we can use this dpendancies
- Spring boot dev tools
- lombok
- Spring web
- Spring data MongoDB
extentions
- java extentions
- maven extentions
CodePudding user response:
spring.data.mongodb.host=127.0.0.1
spring.data.mongodb.port=27017
spring.data.mongodb.authentication-database=admin
spring.data.mongodb.username=<username specified on MONGO_INITDB_ROOT_USERNAME>
spring.data.mongodb.password=<password specified on MONGO_INITDB_ROOT_PASSWORD>
spring.data.mongodb.database=<the db you want to use>
CodePudding user response:
can you help for this
<BrowserRouter>
<nav>
<Link to={'/'} style={{ "marginRight": "10px" }}>Home</Link>
<Link to={'/customer/create'} style={{ "marginRight": "10px" }}>Create customer</Link>
<Link to={'/customer/list'} style={{ "marginRight": "10px" }}>Customer list</Link>
<Link to={'/trader/create'} style={{ "marginRight": "10px" }}>Create trader</Link>
<Link to={'/item/create'} style={{ "marginRight": "10px" }}>Create item</Link>
<Link to={'/item/list'} style={{ "marginRight": "10px" }}>Item list</Link>
<Link to={'/cart/view'} style={{ "marginRight": "10px" }}>View cart</Link>
<Link to={'/promotion/create'} style={{ "marginRight": "10px" }}>Create promotion</Link>
<Link to={'/promotion'} style={{ "marginRight": "10px" }}>Promotion list</Link>
</nav>
<Routes>
<Route path='/' element={<Home />}></Route>
<Route path='/customer/create' element={<CustomerForm />}></Route>
<Route path='/customer/list' element={<CustomerList />}></Route>
<Route path='/trader/create' element={<TraderForm />}></Route>
<Route path='/item/create' element={<ItemForm />}></Route>
<Route path='/item/list' element={<ItemList />}></Route>
<Route path='/item/:id' element={<EditViewItem />}></Route>
<Route path='/cart/view' element={<CartItemList />}></Route>
<Route path='/promotion/create' element={<PromotionForm />}></Route>
<Route path='/promotion' element={<PromotionList />}></Route>
</Routes>
</BrowserRouter>