how to fixe cors problen in angular 6. -------------------------------------------- e.g. -@CrossOrigin(origins = "http://localhost:4200/") -at @configuration class @Bean public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.addAllowedOrigin("*"); config.addAllowedHeader("*"); config.addAllowedMethod("OPTIONS"); config.addAllowedMethod("GET"); config.addAllowedMethod("POST"); config.addAllowedMethod("PUT"); config.addAllowedMethod("DELETE"); source.regis...
Web.xml file is Written .will be load first and inside web.xml file we have one default file will we load Inside at least one servlet should be . Whatever the bean we are writing inside this file will be loaded at server startup or first User Request. i.e Connection beans ,database related beans,tx beans ..etc. For Spring Mvc dispatcherServlet have used -called front controller its take care all the user request and further process .How http request response will be process all stuff will handled by DS Servlet . Flow: Step 1 : first user request will be take by DispatcherServlet. Step 2 : DS will call and take the help of HandlerMapping and get to know the Controller class . Step 3 : And then controller will process the request by executing appropriate methods and return back the View using ModelAndView Step 4: Actual view will populated and Step 5 : Finally DS will pass the ...
brief : ALTER TABLE A ADD CONSTRAINT id PRIMARY KEY (id) ALTER TABLE B ADD COLUMN a_id VARCHAR //add fkey in B as additional cols ALTER TABLE B ADD COLUMN a_id int //now create the fkey ref to agent table on address table alter table B ADD Foreign key(a_id) references A(id); // To obtain the generated constraint name of a table SHOW CREATE TABLE B; ALTER TABLE B DROP FOREIGN KEY b _ibfk_1; //to disable fkey checks. SET foreign_key_checks = 0/1;
name is an key in the jsonarr
ReplyDeleteLike .
Jsonarr=[{
Id:1,name:"sushil"
},
{
Id:12,
Name:"sk"
}
]
On v.name we will get sushil and sk values from jsonarr array object
ReplyDelete