Skip to content

Before packaging into a jar, the program runs normally in IDEA. However, after packaging with the maven-shade-plugin, an exception occurs during execution. I used jd-gui to decompile the jar, and both the mapper class and mapper.xml are present. Below are the related programs and the exception that occurs after running. Could you help me figure out what is causing this issue? #745

Open
@LetAmericaGreatAgain

Description

@LetAmericaGreatAgain

Before packaging into a jar, the program runs normally in IDEA. However, after packaging with the maven-shade-plugin, an exception occurs during execution. I used jd-gui to decompile the jar, and both the mapper class and mapper.xml are present. Below are the related programs and the exception that occurs after running. Could you help me figure out what is causing this issue?

import com.google.inject.PrivateModule;
import com.google.inject.Scopes;
import com.google.inject.name.Names;
import com.ultimate.cas.sso.server.service.IUserService;
import com.ultimate.cas.sso.server.service.impl.UserServiceImpl;
import org.mybatis.guice.XMLMyBatisModule;

public class MybatisModule extends PrivateModule {
@OverRide
protected void configure() {
install(new XMLMyBatisModule() {

        @Override
        protected void initialize() {
            setEnvironmentId("mysql");
            setClassPathResource("mybatis-config-mysql.xml");
            bind(IUserService.class).annotatedWith(Names.named("mysql")).to(UserServiceImpl.class).in(Scopes.SINGLETON);
        }
    });
    expose(IUserService.class).annotatedWith(Names.named("mysql"));
}

}
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions