logo

JSF & PrimeFaces & Spring tutorial 7: Project Lombok

How to use Project Lombok with Eclipse to get rid of getters and setters in Java code.

download result: https://app.box.com/s/vuuhoqn6x5cgvg01vzow

pom.xml:
<dependency>
	<groupId>org.projectlombok</groupId>
	<artifactId>lombok</artifactId>
	<version>1.14.8</version>
</dependency>
HelloController:
@Getter
@Setter
@ManagedBean
public class HelloController {

	@ManagedProperty("#{helloSpringService}")
	private HelloSpringService helloSpringService;

	public String showHello() {
		return helloSpringService.sayHello();
	}

}

comments powered by Disqus

rss

Free online Java web application examples

Want to develop whole web applications which use database, security and more? See my github account, where are lot's of example projects:
github

Search