spring-wind 搭建过程问题记录
? ? ? ?最近想搭一個(gè) shiro+ssm的快速開發(fā)框架,用于后臺(tái)管理以及微信公眾號(hào)的開發(fā)。后臺(tái)主要是權(quán)限管理,于是選擇有spring+shiro,微信公眾號(hào)的前端頁面搜了下有用velocity開發(fā)的,剛好看到群里有人說 springWind,就嘗試了下;
? ?http://git.oschina.net/juapk/SpringWind
? ?從git上面下載后,等待依賴包。。。 ?相當(dāng)?shù)穆?等了一晚上。
? ? 之后按照正常的步驟,配置,啟動(dòng),然后報(bào)錯(cuò)了:
? ? org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logAspect' defined in class path resource [spring/spring-framework.xml]: Cannot create inner bean 'com.baomidou.springwind.service.impl.SysLogServiceImpl#7c7defb9' of type [com.baomidou.springwind.service.impl.SysLogServiceImpl] while setting bean property 'logPoint'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.baomidou.springwind.service.impl.SysLogServiceImpl#7c7defb9': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysLogMapper' defined in file [F:\workspace\SpringWind\SpringWind\target\SpringWind\WEB-INF\classes\com\baomidou\springwind\mapper\SysLogMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [F:\workspace\SpringWind\SpringWind\target\SpringWind\WEB-INF\classes\spring\app-datasource.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.apache.ibatis.session.Configuration.getDefaultScriptingLanguageInstance()Lorg/apache/ibatis/scripting/LanguageDriver;
?
查詢了缺少的類是mybatis的,按說是不應(yīng)該缺少的啊! ?應(yīng)該是缺少jar包或者jar包起沖突了。這樣想著,于是把默認(rèn)的mybatis的4.2換成了4.4
?還是不行,郁悶了。再自己檢查了下pom.xml文件,發(fā)現(xiàn)里面有jdk1.6而本機(jī)用的jdk1.8,趕緊換了。再次重啟,總是不報(bào)錯(cuò)了。。。
org.springframework.beans.factory.BeanCreationException: Error creating?
bean with name 'logAspect' defined in class path resource?
[spring/spring-framework.xml]: Cannot create inner bean?
'com.baomidou.springwind.service.impl.SysLogServiceImpl#7c7defb9' of type?
[com.baomidou.springwind.service.impl.SysLogServiceImpl] while setting?
bean property 'logPoint'; nested exception is?
org.springframework.beans.factory.UnsatisfiedDependencyException: Error?
creating bean with name?
'com.baomidou.springwind.service.impl.SysLogServiceImpl#7c7defb9':?
Unsatisfied dependency expressed through field 'baseMapper'; nested?
exception is?
org.springframework.beans.factory.UnsatisfiedDependencyException: Error?
creating bean with name 'sysLogMapper' defined in file [F:\workspace
\SpringWind\SpringWind\target\SpringWind\WEB-INF\classes\com\baomidou
\springwind\mapper\SysLogMapper.class]: Unsatisfied dependency expressed?
through bean property 'sqlSessionFactory'; nested exception is?
org.springframework.beans.factory.BeanCreationException: Error creating?
bean with name 'sqlSessionFactory' defined in file [F:\workspace
\SpringWind\SpringWind\target\SpringWind\WEB-INF\classes\spring\app-
datasource.xml]: Invocation of init method failed; nested exception is?
java.lang.NoSuchMethodError:?
org.apache.ibatis.session.Configuration.getDefaultScriptingLanguageInstan
ce()Lorg/apache/ibatis/scripting/LanguageDriver;
?
?
?
2)初次搭建的時(shí)候,按照作者的提示,需要配置host。如果不想配置host,可以這樣:
?
修改配置文件 sso.properties
?
sso.secretkey=Lg8V51188n0809i5l8sso.cookie.name=uid
sso.cookie.domain=localhost
sso.login.url=http://localhost:8088/SpringWind/account/login.html
如果項(xiàng)目配置了 名稱,后面就跟項(xiàng)目名稱,比如我的是SpringWind,就使用 http://localhost:8088/SpringWind/account/login.html,如果不配置項(xiàng)目名稱,則使用 http://localhost:8088/account/login.html
另外就是修改下domain的值為localhost。作者自己寫的攔截器里面有攔截,如果domain和本地ip地址不同,會(huì)一直跳轉(zhuǎn)到首頁。同理如果部署到服務(wù)器,則使用服務(wù)器的ip即可。
轉(zhuǎn)載于:https://www.cnblogs.com/thinkingandworkinghard/p/6685153.html
總結(jié)
以上是生活随笔為你收集整理的spring-wind 搭建过程问题记录的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Learning to Rank算法介绍
- 下一篇: 《程序设计与数据结构》第6周学习总结