Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of Spring Transaction AspectJ On Spring Boot #4

Open
hendratommy opened this issue Jun 28, 2019 · 1 comment
Open

Example of Spring Transaction AspectJ On Spring Boot #4

hendratommy opened this issue Jun 28, 2019 · 1 comment

Comments

@hendratommy
Copy link

It would be great if there is an definitive example how to configure Spring Transaction (AspectJ mode), the current documentation seems confusing. It would be great if you can provide one.

I have an application based on Spring Boot 2.0.x, its running fine but when upgrading to 2.1.x its producing many error output at startup saying error can't determine implemented interfaces which causing slow start up:

[LaunchedURLClassLoader@5fcfe4b2] error can't determine implemented interfaces of missing type net.sf.ehcache.CacheManager
when weaving type org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration
when weaving classes
when weaving
 [Xlint:cantFindType]
[LaunchedURLClassLoader@5fcfe4b2] error can't determine implemented interfaces of missing type net.sf.ehcache.CacheManager
when weaving type org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration
when weaving classes
when weaving

And seems like I'm not the only one:

I get it to working by having the spring transaction in aop.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
<aspectj>
    <weaver>
        <include within="com.my.app..*" />
        <include within="org.springframework.transaction..*" />
    </weaver>
</aspectj>

But I left wondering if this is the correct way, since many other package do not get woven did i miss something that i do not aware of?

@adminy
Copy link

adminy commented Jun 8, 2022

I got the same error running a different java version for compiling the aspects than the application java version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants