Mostrar mensagens com a etiqueta Maven. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta Maven. Mostrar todas as mensagens

27 outubro 2022

SpringBoot - Write Microservice in less than 2 mins..


Pre-requisite :
  • Spring boot 2.7.0
  • Maven 3.6 +
  • Java 8 or later


Please add below dependencies in the project .
  • spring-boot-starter-web
  • spring-boot-starter-data-jpa
  • spring-boot-starter-data-rest
  • lombok
  • H2
  • spring-boot-devtools







26 março 2020

WebArtilce - Writing More Readable Code with Project Lombok


We have written a lot of boilerplate code such as getter, setter, equals, hashCode methods etc. in Java for years. In some cases, this causes problems in subjects like clean and readable code.

For such situations, Project Lombok saves our eyes :). Also, you will be able to spend more time on the business logic using Lombok.



Source: medium.com

21 janeiro 2015

Web Article - Quartz HelloWorld Example

pom.xml:

 4.0.0
 com.javacodegeeks.snippets.enterprise
 quartzexample
 0.0.1-SNAPSHOT

 
  
   org.quartz-scheduler
   quartz
   2.2.1
  
 


MyApp.java
package com.javacodegeeks.snippets.enterprise.quartzexample;

import org.quartz.CronScheduleBuilder;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SimpleScheduleBuilder;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;

import com.javacodegeeks.snippets.enterprise.quartzexample.job.ByeJob;
import com.javacodegeeks.snippets.enterprise.quartzexample.job.HelloJob;

public class MyApp {

 public static void main(String[] args) {
  try {
   JobDetail job1 = JobBuilder.newJob(HelloJob.class).withIdentity("helloJob", "group1").build();

   Trigger trigger1 = TriggerBuilder.newTrigger().withIdentity("simpleTrigger", "group1")
     .withSchedule(SimpleScheduleBuilder.repeatSecondlyForTotalCount(30)).build();   
   Scheduler scheduler1 = new StdSchedulerFactory().getScheduler(); 
   scheduler1.start(); 
   scheduler1.scheduleJob(job1, trigger1); 
   
   JobDetail job2 = JobBuilder.newJob(ByeJob.class).withIdentity("byeJob", "group2").build();
   Trigger trigger2 = TriggerBuilder.newTrigger().withIdentity("cronTrigger", "group2")
     .withSchedule(CronScheduleBuilder.cronSchedule("0/5 * * * * ?")).build();
   Scheduler scheduler2 = new StdSchedulerFactory().getScheduler();
   scheduler2.start(); 
   scheduler2.scheduleJob(job2, trigger2); 
   }
  catch(Exception e){ 
   e.printStackTrace();
  }
 }

}

Source: javacodegeeks

27 fevereiro 2014

Maven - Standard Directory Layout

src/main/javaApplication/Library sources
src/main/resourcesApplication/Library resources
src/main/filtersResource filter files
src/main/assemblyAssembly descriptors
src/main/configConfiguration files
src/main/scriptsApplication/Library scripts
src/main/webappWeb application sources
src/test/javaTest sources
src/test/resourcesTest resources
src/test/filtersTest resource filter files
src/siteSite
LICENSE.txtProject's license
NOTICE.txtNotices and attributions required by libraries that the project depends on
README.txtProject's readme

More in Maven

17 novembro 2013

Web Tutorials

Web Tutorials

JAVA
Simple Java Database Swing Application
How to Send Email from Java Program with Example
Java ResourceBundle Example

Creating Maven Projects
Hibernate 3 with Maven 2 and MySQL 5 Example (XML Mapping and Annotation)
How to create a EJB 3.x project using Maven in Eclipse – Part 1
Setup of Dynamic Web Project using Maven
Create Web Application Project with Maven Example

JMS
Spring JMS Example

Java EE7 and Maven
Java EE7 and Maven project for newbies - part1 part2 part3 part4 part5 part6 part7 part8
Spring JPA Data + Hibernate + MySQL + MAVEN
Spring MVC Hello World Example
Spring MVC File Upload Example
Spring MVC beginner tutorial with Spring Tool Suite IDE
Upload Files to Database with Spring MVC and Hibernate

Logging 
Logback
Logback Configuration Example

WELD - Java Contexts and Dependency Injection for the Java EE platform (CDI)
DI (Dependency Injection) / CDI – Basics
Writing JSR-352 style jobs with Spring Batch Part 2: Dependency injection

Spring Data MongoDB
Spring Data MongoDB with Java config

JPA
JPA Tutorial: Setting Up JPA in a Java SE Environment
JPA Tutorial: Mapping Entities – Part 1 - Part 2 - Part 3

Hibernate
Hibernate annotations example
Hibernate tutorial with Eclipse

Persistence
The DAO with JPA and Spring
How to maintain history of tables in Hibernate

Android Tutorials
Android Development Tutorial

07 novembro 2013

Java Tutorials


Java Excel “Apache POI”
Apache POI – Java Read & Write Excel





Source: Hmkcode

23 outubro 2013

Web Article - JSF Tomcat Configuration Example

In this example we can view how configure JSF with Tomcat application server.
For this was created a simple project using JSF and then deployed it in tomcat server.

View Example

13 setembro 2013

Web Article - Build offline with maven


"Sometimes I work at home and sometimes I’ve no VPN connection to my company. Sometimes I sit in a hotel without any internet connection. But I want to compile my projects with maven."

Full article here.

08 setembro 2013

Web Article - How Maven find dependency JARs while building Java Project

"One of the most attractive feature of Apache Maven framework it to manage dependency JARs, but do you know, How Maven finds dependency JAR while building Java project?"

Read more here

24 agosto 2013

Configure and Create Maven test application

"Maven is the java build tool that helps the create enterprise application in the standard directory structure and resolve the dependency to compile and run the application. Maven is used to create deployable artifact. It is project management tool that provide build capabilities."

Full article here

01 junho 2013

Setup of Dynamic Web Project using Maven

Good article that show how to create a Dynamic Web Project using Maven.
Full article here.

In same blog i found other interesting article about
Spring JPA Data + Hibernate + MySQL + MAVEN that show how we can develop a web-applications with the help of Spring MVC.