In Spring 2.5, comes with a handy RowMapper implementation called
‘BeanPropertyRowMapper’, which can maps a row’s column value to
a
property by matching their names. Just make sure both the property and
column has the same name, e.g property ‘custId’ will match
to column name ‘CUSTID’ or with underscores ‘CUST_ID’.
String sql = "SELECT * FROM CUSTOMER WHERE CUST_ID = ?";
Customer customer = (Customer)jdbcTemplate().queryForObject( sql, new Object[] { custId },
new BeanPropertyRowMapper(Customer.class));
References Used :- spring-jdbctemplate-querying-examples
- log4j vs System.out.println() Anything that you print to System.out will go to "standard out", and
while you can redirect standard out to a file and compare it, what have
you, that is very inflexible. Additionally, you cannot filter what goes
to standard out if you use System.out... everything will be printed.
With log4j, you can set different logging levels, so that logging
messages that are below a certain severity/importance threshold are not
printed (e.g. if you change the logging level to WARN, then DEBUG and
INFO messages will not be displayed anymore). Additionally, log4j allows logging to be controlled on a
class-by-class basis, whereas System.out can only be controlled at the
granularity of the entire application (if you redirect System.out, you
redirect it for the entire program). By contrast, each logger in log4j
can be given a different appender. In addition, you can give a log4j
logger multiple appenders (so that it goes the system logger, and over
the network, for example). You can even have a log4j logger append to a
StringBuilder, so that you can easily read what was written. And while
System.out can be redirected, this redirection tends to be fairly
limited; System.out can be redirected to a file or to a pipe (to
another program), but you wouldn't be able to redirect it to a URL, for
example; by contrast, it would be very easy to create an appender that
transmits logging messages using HTTP POST. References Used :- log4j-vs-system-out-println
- Difference between a Web Server, an Application Server, and a Database Server
- Web Server: Web server handles web requests sent by visitors visiting your website(primarily respond to HTTP / HTTPS requests). Web server runs on Apache, Nginx, Microsoft IIS, etc.
- Application Server: Application server is the server that works between Web server and database server and basically manages, processes the data.Application server can contain web server in them. For example :- JBoss, WAS
Application
server provides following features over web server :- Connection
pooling , Transaction management , Messaging , Clustering , Load
Balancing
- Database Server: Database server handles database queries. It runs on MySQL, PostgreSQL, MariaDB, etc
- Thymeleaf is a modern server-side Java template engine for both web and standalone
environments.
Thymeleaf's main goal is to bring elegant natural templates to
your development workflow — HTML that can be correctly displayed in browsers
and also work as static prototypes, allowing for stronger collaboration
in development teams.
With modules for Spring Framework, a host of integrations with
your favourite tools, and the ability to plug in your own functionality,
Thymeleaf is ideal for modern-day HTML5 JVM web development
- WildFly Server , formerly known as JBoss AS, or simply JBoss, is an application server authored by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition specification. It runs on multiple platforms.
- JSF Current (10th Jan 2019) version is . 2.3 is the designated user interface standard for Java EE 8. It went final on 17 April 2017. JSF 2.2 is the user interface standard for Java EE 7 The most recent major release of JSF is 2.2.
Version :- 1.0.1