thymeleaf-extras-data-attribute | Thymeleaf dialect for data attributes | Authorization library
kandi X-RAY | thymeleaf-extras-data-attribute Summary
kandi X-RAY | thymeleaf-extras-data-attribute Summary
Thymeleaf dialect for data attributes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Checks all attributes of the given element
- Process a data attribute
- Gets processors
thymeleaf-extras-data-attribute Key Features
thymeleaf-extras-data-attribute Examples and Code Snippets
Community Discussions
Trending Discussions on thymeleaf-extras-data-attribute
QUESTION
I'm not able to make Log4j2 write Spring and Spring Security log messages (the latter I absolutely need to solve an issue) on log file. I've read a lot here and elsewhere (like in the Spring reference, of course) but I cannot make the solutions I found work for my case.
It's important to note that on both the solutions below, mine logging messages and hibernate ones are written correctly on file. The problem affects only Spring messages.
As far as I understand, Spring uses jcl (commons-logging) and there are two ways to let Spring uses Log4j2:
- simply adding the bridge log4j-jcl (jcl -> log4j2)
- using SLF4J with jcl-over-jcl and log4j-slf4j-impl (jcl -> slf4j -> log4j2)
I tried to exclude commons-logging from every other dependecy, in order to control manually its inclusion. In the first solution I let it included, in the second I exclude it, but I've seen diverse opinions on the topic. Anyway, in both cases Spring doesn't log.
I can see that hibernate uses jboss-logging. Is this the reason why it works on both configuration? Can its inclusion be a problem for Spring logging?
Can the application server be a problem on this? Maybe some library loaded by default that overrides application libs making a mess?
This is my environment:
- Java 1.6
- Servlet 2.5
- Oracle weblogic 12.1
- Spring MVC 4.3.4.RELEASE
- Spring Security 4.2.0.RELEASE
- Log4j 2.3 (last version compatible with Java 6)
- Hibernate entity manager 4.2.21.final
- SLF4J 1.7.22
I guess there is a dependency problem: some library that shouldn't be there or that is missing.
EDIT:
From my dependency tree I don't see a dependency of spring-core
on commons-logging
, like reference says. I can see one of spring-data-jpa
on slf4j
and on jcl-over-slf4j
. The presence of jcl-over-sl4j
shluld be the problem, as rgoers suggested. I'll update results...
So this is my pom.xml dependencies section (as you can see there are two different logging dependencies configuration, one commented; both this configuration make mine and hibernate logs working good, but neither of the two makes Spring ones written):
...ANSWER
Answered 2017-Feb-10 at 12:18https://www.slf4j.org/legacy.html
As you can see, you need add jcl-over-slf4j.jar
and exclude commons-logging.jar
(both has identical file structure inside, check it) After that, include slf4j-api.jar
, bridge slf4j-log4j.jar
and actual logging implementation - log4j.jar
Check for commons-logging.jar
in resulted war file, it shouldn't present.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install thymeleaf-extras-data-attribute
You can use thymeleaf-extras-data-attribute like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the thymeleaf-extras-data-attribute component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page