Saturday, March 21, 2020

Aspects to log enter and exit method

The idea is:

use @EnableAspectJAutoProxy in a @Configuration

create an annotation EntryExitLogger to mark the method(s) you want to be logged for entry/exit

have a @Component annotated with @Aspect and inside it you specify the aspects:

public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable{

That's all.

Detailed post on the topic

Doc of AspectJ here

Good Aspectj cookbock here

Wednesday, February 19, 2020

github and line separators " You can tell Git to convert CRLF to LF on commit but not the other way around by setting core.autocrlf to input:

$ git config --global core.autocrlf input " this one also helps

Per-repository settings

Optionally, you can configure a .gitattributes file to manage how Git reads line endings in a specific repository. When you commit this file to a repository, it overrides the core.autocrlf setting for all repository contributors. This ensures consistent behavior for all users, regardless of their Git settings and environment.

in Intellij there is an "Inconsistent line separators inspection", to check if the files have "line terminator" different from the default setup for the project
"This inspection detects files with line separators different from the project default. E.g. you set the line separator to "\n" in the Settings|Code Style|Line separator, and the file you are editing uses '\r\n' as a line separator"

Thursday, February 13, 2020

Spring Integration nice tutorial here

code is available at