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!   300 total views, 4 views today

300 total views, 4 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 […]

262 total views, 4 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: […]

148 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 […]

143 total views, 4 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 […]

177 total views, 4 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 […]

194 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 […]

367 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 […]

302 total views, 2 views today

» Read more

When does spring create instances to be injected ?

When does spring create instances to be injected ? This is one of the famous spring / spring boot framework interview question. Spring creates the instances to be injected during the start up. If you have configured spring beans with lazy-init attribute then spring creates the instances of those bean only when you inject/any of it’s dependencies injects it. By […]

220 total views, no views today

» Read more

Why StringBuffer/StringBuilder should be avoided in HashMap?

Why StringBuffer/StringBuilder should be avoided in HashMap?   This is one of the core java interview question under collections category. Generally in all the map manipulations we use string and avoid stringbuffer and stringbuilders, because both are mutable. What is the issue if is mutable ? If you are keeping your hashmap’s key/value as stringbuilder/stringbuffer then once after you inserted […]

293 total views, 3 views today

» Read more
1 2 3 64