Spring Boot. Background tasks and not only

Introduction


 
In this tutorial I would like to give an example of an application for sending emails to users, based on the date of their birth (for example, with congratulations) using the Scheduled annotation. I decided to bring this example, in my opinion it includes quite a few things, such as working with the database (in our case this is PostgreSQL), Spring Data JPA, a new java 8 time api, email service, creating background tasks and small business logic while remaining compact. Today the Internet is full of a huge number of tutorials that usually boil down to how to inherit from CrudRepository...[/h]
+ 0 -

Open free broadcast of the Java conference JPoint 2018

Open free broadcast of the Java conference JPoint 2018  
 
April 6-? that is tomorrow, will be held JPoint 2018 - an international Java-conference for experienced Java-developers. About the program of this conference, we wrote more than once and not two .
 
We analyzed a set of the most relevant topics (performance and hardcore hardcore, Spring and the bloody enterprise, new frameworks and JVM-languages ​​and so on - a huge list), and for each topic, we tried to find at least one good report. JPoint is held for two days, there will be about forty reports, so all the main questions will be covered in one way or another.
 
A year ago we started to ...
+ 0 -

Spring AOP and JavaConfig in the plugins for Atlassian Jira

Spring AOP and JavaConfig in the plugins for Atlassian Jira In this article we will develop a plugin for Atlassian Jira, where using JavaConfig we define a bin with the scope of the prototype, we log calls to bin methods using AOP, and display the information from external beans (ApplicationProperties, JiraAuthenticationContext and ConstantsManager).
 
The source code for the plug-in can be found here: here .
 
localhost : 2990 /jira /and log in to Jira.
 
 
 
 
Set the logging level of the package ru.matveev.alexey in DEBUG. To do this, go to System-> Logging and Profiling:
 
 
 ...
+ 0 -

Mutual transformations of JSON, YAML, XML

JSON, YAML are now popular, and XML technologies are considered a relic of the past.
 
Mutual transformations of JSON, YAML, XML
 
Let's try to take advantage of dusty XPath, XQuery for data in JSON and YAML format. And we are discussing why all this "old" is applied to the modern and beautiful?
 
JsonPath repeats a subset of XPath, but only to the JSON format. And to write a declarative query without programming will not work - there is no analog XQuery. Alternatively, you could use any embedded database in jvm with its declarative language as a query, but this is a topic for a separate publication and the original data model in json, yaml ...
+ 0 -

Creating a simple RESTful API with Java Spark

That you will study
 
You will learn how to define generic controllers using the Java 8 functional interfaces. Sample code on GitHub .
Spark Test . Example code testing.
 
public class EchoControllerTest {
private static String echoUrl = "/api /v1";
private static Integer randomPort = 1000 + new Random (). nextInt (60000);
public static class BoardBoxControllerTestSparkApplication implements SparkApplication {
@Override
public void init () {
EchoApplication.start ();
}
}
@ClassRule
public static SparkServer
testServer = new SparkServer <>(BoardBoxControllerTestSparkApplication.class...
+ 0 -

Compatibility issues for Tibero and Oracle. Part 2. Developing Java applications

Compatibility issues for Tibero and Oracle. Part 2. Developing Java applications
 
We continue the cycle of articles developers of applications for databases. This article will cover the topic of using Tibero in Java applications using JDBC and Hibernate, as well as the Spring Roo framework.
 
Last year came Spring Roo ???.RC2. This is a java framework that allows you to significantly reduce the time to develop prototypes for Spring MVC applications that interact with databases (databases), SOAP and RESTful web services. It is also important that the latest version of the framework creates a Spring Boot application and uses the HTML template engine for THYMELEAF pages, i.e. unlike ...
+ 0 -

Programming according to the contract for JVM

Programming according to the contract for JVMHello, Habr! I present to your attention the translation of the article " " Programming by contract on the JVM "By Nicolas Fränkel.
 
Wikipedia
 
 
 
In fact, the conditions quickly stop working. It makes no sense to run the code, if at the end, the calculation fails because of an incorrect assumption.
 
 
Let's look at an example of a transfer operation between two bank accounts. Here are some conditions:
 
 
Pre-conditions:
 
 
 
The amount transferred must be positive.
 
 
Constants:
 
 
 
The initial bank account must have a positive balance.
 
 
Post-conditions: ...
+ 0 -

Modify the player Vanilla Music for Android (part 2)

In the past article we figured out how to add to the player with open source. Vanilla Music the ability to switch tracks with the volume keys, if this device is in your pocket (for example). In this article, we continue to modify the main idea for which the following idea served - how you can switch tracks without touching the smartphone, without unlocking it - in general with minimal effort.
 
(Proximity sensor) . The essence of the idea is to switch the track when there is ...
+ 0 -

Educational Java framework for in-depth training

+ 0 -

Plans for JPoint 2018

Plans for JPoint 2018
 
Soon, an international Java-conference will be held in Moscow. JPoint , so it's time to decide on the reports that are worth going to. The story will be about the reports to which I personally go and why.
 
I earn Java application development since 2012. Basically I solve the problems of system integration and project management, I participated in several dozen projects, I know firsthand about the development of web services, desktop and web applications.
4 streams , and the choice of the most relevant topics is not so simple. This is what I came to:
 
Day 1...
+ 0 -