package io.jboot.test.aop.inject;

import com.jfinal.aop.Inject;
import io.jboot.aop.annotation.Bean;

@Bean
public class UserServiceImpl implements UserService {

    @Inject
    private OtherService aService;

    public UserServiceImpl() {
        System.out.println("new UserServiceImpl...");
    }

    @Override
    public String getName(String para) {
        return "UserServiceImpl:" + para;
    }
}

package io.jboot.test.aop.inject;

import com.jfinal.aop.Inject;
import io.jboot.aop.annotation.Bean;

@Bean
public class UserServiceImpl implements UserService {

    @Inject
    private OtherService aService;

    public UserServiceImpl() {
        System.out.println("new UserServiceImpl...");
    }

    @Override
    public String getName(String para) {
        return this.getClass().getName() + " : " + para;
    }
}

update jfinal 4.0