2020 m. gegužės 24 d., sekmadienis

Tomcat linux working tutorial

Tomcat working install tutorial

$ sudo ./bin/startup.sh
$ sudo ./bin/shutdown.sh
$ sudo ./bin/shutdown.sh && sudo ./bin/startup.sh #Restart

$ sudo catalina.sh run #command will print the logs to your terminal 


http://localhost:8080 




Skiping tests

mvn install -DskipTests
mvn clean package

2020 m. gegužės 20 d., trečiadienis

Java spring logging


The available logging levels in Logback are:

OFF (output no logs)
ERROR
WARN
INFO
DEBUG
TRACE

Loging messeage meanings:
LOGGER.trace("doStuff needed more information - {}", value);
LOGGER.debug("doStuff needed to debug - {}", value);
LOGGER.info("doStuff took input - {}", value);
LOGGER.warn("doStuff needed to warn - {}", value);
LOGGER.error("doStuff encountered an error with value - {}", value);


To disable dublicating log code to log, add to logback.xml:
additivity="false"


Adding logger like:
private static final Logger log = LoggerFactory.getLogger(YourClassName.class);


Sources:

2020 m. gegužės 19 d., antradienis

2020 m. gegužės 12 d., antradienis

Java .jar generavimas


jaro generavimas
$ jar cvfe VardasCalc.jar lt.vtmc.ems.Main -C bin .

Priklausomybiu generavimas
$ jdeps bin/lt/vtmc/ems/Main.class > calcdependency.txt