NutzCN Logo
问答 我在nutzboot中引入redisservice报错
发布于 155天前 作者 liouhongde 262 次浏览 复制 上一个帖子 下一个帖子
标签:

我在项目中引入redisservice
@Inject
protected Dao dao;
// @Inject
// private RedisService redisService;
报错内容
启动报[ERROR] 10:50:11.673 org.nutz.boot.NbApp.execute(NbApp.java:218) - something happen!!
org.nutz.ioc.IocException: IocBean[mainHttpAPILauncher] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:240)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:270)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:160)
at org.nutz.boot.NbApp.execute(NbApp.java:208)
at org.nutz.boot.NbApp.run(NbApp.java:177)
at cn.aotu.http.MainHttpAPILauncher.main(MainHttpAPILauncher.java:45)
Caused by: java.lang.RuntimeException: IocBean[mainHttpAPILauncher] fail at field=[redisService]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 6 more
Caused by: org.nutz.ioc.IocException: IocBean[class:org.nutz.integration.jedis.RedisService] none ioc bean match class=org.nutz.integration.jedis.RedisService
at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:460)
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
... 8 more
pom写法

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1.r.65
2.0.8.v20180205-RELEASE
0.0.8-tio-http
2.9.0



nutz
https://jfrog.nutz.cn/artifactory/jcenter


nutz-snapshots
https://jfrog.nutz.cn/artifactory/snapshots

true
always


false





org.nutz
nutz
${nutz-version}


redis.clients
jedis
${redis-version}


org.nutz
nutz-integration-jedis
${nutz-version}


org.t-io
tio-core
${tio-version}


org.t-io
tio-http-server
${tio-http-version}


log4j
log4j
1.2.17


com.google.guava
guava
23.0


com.alibaba
druid
1.0.28


com.alibaba
jconsole


com.alibaba
tools




mysql
mysql-connector-java
8.0.15


org.nutz
nutzboot-starter-nutz-mvc
2.2-SNAPSHOT


org.nutz
nutzboot-starter-nutz-dao
2.2-SNAPSHOT


org.nutz
nutzboot-starter-jdbc
2.2-SNAPSHOT


org.nutz
nutzboot-starter-jetty
2.2-SNAPSHOT


org.slf4j
slf4j-log4j12
1.7.25


org.postgresql
postgresql
42.1.4

2 回复
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <nutz-version>1.r.65</nutz-version>
        <tio-version>2.0.8.v20180205-RELEASE</tio-version>
        <tio-http-version>0.0.8-tio-http</tio-http-version>
        <redis-version>2.9.0</redis-version>
    </properties>
    <repositories>
        <repository>
            <id>nutz</id>
            <url>https://jfrog.nutz.cn/artifactory/jcenter</url>
        </repository>
        <repository>
            <id>nutz-snapshots</id>
            <url>https://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz</artifactId>
            <version>${nutz-version}</version>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>${redis-version}</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz-integration-jedis</artifactId>
            <version>${nutz-version}</version>
        </dependency>
        <dependency>
            <groupId>org.t-io</groupId>
            <artifactId>tio-core</artifactId>
            <version>${tio-version}</version>
        </dependency>
        <dependency>
            <groupId>org.t-io</groupId>
            <artifactId>tio-http-server</artifactId>
            <version>${tio-http-version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>23.0</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.28</version>
            <exclusions>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>jconsole</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>tools</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.15</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-mvc</artifactId>
            <version>2.2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-dao</artifactId>
            <version>2.2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jdbc</artifactId>
            <version>2.2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jetty</artifactId>
            <version>2.2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.1.4</version>
        </dependency>
    </dependencies>

nutzboot 项目不应该引入 nutzboot-starter-redis 么,怎么去引入 nutz-integration-jedis ?

群里已回复过的。

添加回复
请先登陆
回到顶部