Posts

Showing posts from July, 2021

WEB Services by SpringMVC

Image
WebServices  ...  Spring MVC project... Project Structure AppConfig.java package com.app.configuration; import java.util.Properties; import org.hibernate.Transaction; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.orm.hibernate5.HibernateTransactionManager; import org.springframework.orm.hibernate5.LocalSessionFactoryBean; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.InternalResourceViewResolver; import com.app.model.User; @Configuration @EnableWebMvc @Compon...

Mongo DB Commands

Mongo  DB commands for database ............................ 1. view all databases ------------------- show dbs 2. create a new database or select ---------------- use dbname 3. view currunt database ---------------- db 4. delete database ---------------------- db.dropDatabase() Commands for collections ....................................... 5. create new collection ---------------- db.createCollection('collection name') 6. show all collections ----------------- show collections 7. delete collection -------------------- db.collection name.drop() commands for Rows  8. Insert a one row ---------------------  db.collection name.insert({                                                                                                   ...