How to get JPA Project option in Eclipse STS ?

How to get JPA Project option in Eclipse STS ? By default JPA project option is not there when you check under New project in STS eclipse. To make it available install hibernate tools plugin(which is currently Jboss Tools)     Now you will be able to create the JPA Project,   Hope this helps!   154 total views, 20 views today

154 total views, 20 views today

» Read more

How to disable the default spring security in spring boot ?

How to disable the default spring security in spring boot ? To disable the spring boot’s default spring security / to disable the security for all the urls then include the below method in your custom security class which extends WebSecurityConfigurerAdapter Method to include: /* to permit all */ @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable().authorizeRequests().anyRequest().permitAll(); } Full […]

154 total views, 2 views today

» Read more

Installing curl on windows 10

Installing curl on windows 10:   Downloading Curl for Windows: Curl for Windows Portable Edition Curl for Windows   Installing CURL in windows: Once you downloaded the msi (or) exe file (or) portable from the above link double click and install it, if is is portable then just configure the environment variable alone like this,   Environment Variable Path Setting: […]

87 total views, 2 views today

» Read more

Tomcat 7 Default Administrator Password

Tomcat 7 Default Administrator Password By default you can see the below content in tomcat-users.xml file under (apache-tomcat-7.0.88\conf) By default nothing is configured so add your own username and password for manager-gui roles to get the access for Manager App & Host Managers. <?xml version=’1.0′ encoding=’utf-8′?> <!– Licensed to the Apache Software Foundation (ASF) under one or more contributor license […]

77 total views, 2 views today

» Read more

Arraylist to Array Using ToArray() in java

Syntax: <T> T[] toArray(T[] a) Eg : String[] y = x.toArray(new String[0]); T – the runtime type of the array to contain the collection Parameters: a – the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. Returns: an array […]

188 total views, 4 views today

» Read more

hashMap Vs TreeMap Vs LinkedHashMap

════════════╦═════════════════════╦═══════════════════╦═════════════════════╗ ║ Property ║ HashMap ║ TreeMap ║ LinkedHashMap ║ ╠══════════════╬═════════════════════╬═══════════════════╬═════════════════════╣ ║ Iteration ║ no guarantee order ║ sorted according ║ ║ ║ Order ║ will remain constant║ to the natural ║ insertion-order ║ ║ ║ over time ║ ordering ║ ║ ╠══════════════╬═════════════════════╬═══════════════════╬═════════════════════╣ ║ Get/put ║ ║ ║ ║ ║ remove ║ O(1) ║ O(log(n)) ║ O(1) ║ ║ containsKey […]

192 total views, 2 views today

» Read more

Bean validation in Spring Rest using @Valid

Bean validation in Spring Rest using @Valid: Bean validation is important to validate the input bean received in the spring restful requestbody. And also default error messages may not be properly understandable by our consumers, so validating the bean and responding the proper readable message to our consumers makes our spring restful webservice better.   How are we going to […]

109 total views, 2 views today

» Read more

Entity to DTO using Model Mapper in Spring Restful Web services

Entity to DTO using Model Mapper in Spring Restful Web services: In spring restful webservices we can not directly expose our entity pojo classes as json responses as it has lot of issues like security/unwanted data’s exposure etc. Data Transfer Object (DTO) is a design pattern which actually resolves this issue. I am going to do these sample in spring […]

135 total views, 2 views today

» Read more

GenerationType.IDENTITY vs GenerationType.SEQUENCE vs GenerationType.AUTO

GenerationType.IDENTITY vs GenerationType.SEQUENCE vs GenerationType.AUTO: In hibernate for the primary key/auto generated id value column we used to annotate @GeneratedValue with strategy as either of these, GenerationType.IDENTITY 2. GenerationType.SEQUENCE 3. GenerationType.AUTO   It is highly important to understand the difference between these generation types to make it fit in the right place. Suppose you have two tables namely store and […]

227 total views, 3 views today

» Read more

Difference between @Inject and @Autowired

Difference between @Inject and @Autowired This is one of the important interview question of spring / spring boot framework interviews. Auto-wiring is the great feature we got to wire our application dependencies spring way, but it can be done by both JSR annotation and spring provided annotation. It is important to know the difference between these both to make use […]

241 total views, 4 views today

» Read more
1 2 3 66