Saturday, 30 September 2017

convert maven project to eclipse

use this command in command prompt


mvn eclipse:eclipse

Fixed - Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:

Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:

file:/C:/Users/User1/.m2/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar
to fix this issue
try deleting this jar file and run your app and keep a backup of this jar file.

Saturday, 29 July 2017

spring boot app jdbc configuration

How to connect spring boot with mysql.

to configure spring boot app with JDBC add jar in pom.xml
and add these property in application.poperties file

spring.datasource.url=jdbc:mysql://localhost/test
spring.datasource.username=dbuser
spring.datasource.password=dbpass
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

how to run server of spring boot auto reload mode while in code development

I can called it as hot deployment.to save code deployment time.
while developing my code without restarting server spring boot auto reload allow me to reload my class code changes auto deploy on server for this I have to add this jar my "pom.xml" file.

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>
</dependencies>

Thursday, 27 July 2017

Spring Boot Starters

Spring Boot Starters Project


Spring Boot Starters are a set of convenient dependency descriptors that you can include in your application. The starters contain a lot of the dependencies that you need to get a project up and running quickly for production ready  deployment  and ready to use.


Sunday, 23 July 2017

how to remove spring boot banner


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.4.RELEASE)

To remove this:
1)

spring.main.banner-mode=off

Add above line in file
application.properties

######################### OR
2) USE this in Main java class

setBannerMode(Banner.Mode.OFF);

######################### OR
3) in app*.yml file

spring:
        main :
               banner-mode=off