Skip to content

boommanpro/groovy-dynamic-loading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java Dynamic loading

e.g.

    @Test
    public void createNewClassTest() throws Exception {
        ClassPathResource resource = new ClassPathResource("HelloWorldServiceImpl.java");
        GlueFactory glueFactory = GlueFactory.getInstance();
        HelloWorldService helloWorldService = glueFactory.loadNewInstance(IOUtils.toString(resource.getInputStream()), HelloWorldService.class);
        Assertions.assertEquals("java-glud", helloWorldService.sayHello());
    }

About

groovy动态加载java文件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages