Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webmagic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
webmagic
Commits
c7169328
Commit
c7169328
authored
Mar 16, 2014
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor config resource
parent
23d1151b
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
4 additions
and
206 deletions
+4
-206
applicationContext-myBatis.xml
.../src/main/resources/spring/applicationContext-myBatis.xml
+0
-21
applicationContext.xml
...ic-admin/src/main/resources/spring/applicationContext.xml
+0
-47
web.xml
...gic-avalon/webmagic-admin/src/main/webapp/WEB-INF/web.xml
+1
-1
freemarker.properties
...on-common/src/main/resources/config/freemarker.properties
+0
-0
log4j.xml
...gic-avalon-common/src/main/resources/config/log/log4j.xml
+0
-0
DynamicClass.xml
...-common/src/main/resources/config/mapper/DynamicClass.xml
+0
-0
applicationContext-component.xml
.../resources/config/spring/applicationContext-component.xml
+0
-0
applicationContext-datasource.xml
...resources/config/spring/applicationContext-datasource.xml
+0
-0
applicationContext-freemarker.xml
...resources/config/spring/applicationContext-freemarker.xml
+0
-0
applicationContext-myBatis.xml
...in/resources/config/spring/applicationContext-myBatis.xml
+1
-1
applicationContext-service.xml
...in/resources/config/spring/applicationContext-service.xml
+0
-0
applicationContext-tx.xml
...rc/main/resources/config/spring/applicationContext-tx.xml
+0
-0
applicationContext-webmvc.xml
...ain/resources/config/spring/applicationContext-webmvc.xml
+0
-0
applicationContext-freemarker.xml
...c/main/resources/spring/applicationContext-freemarker.xml
+0
-34
AbstractTest.java
...mon/src/test/java/us/codecraft/webmagic/AbstractTest.java
+1
-1
applicationContext-freemarker.xml
...c/main/resources/spring/applicationContext-freemarker.xml
+0
-34
applicationContext-myBatis.xml
.../src/main/resources/spring/applicationContext-myBatis.xml
+0
-21
applicationContext.xml
...c-worker/src/main/resources/spring/applicationContext.xml
+0
-45
web.xml
...ic-avalon/webmagic-worker/src/main/webapp/WEB-INF/web.xml
+1
-1
No files found.
webmagic-avalon/webmagic-admin/src/main/resources/spring/applicationContext-myBatis.xml
deleted
100644 → 0
View file @
23d1151b
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
>
<!--<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">-->
<!--<property name="dataSource" ref="dataSource" />-->
<!--</bean>-->
<!--<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">-->
<!--<property name="basePackage" value="us.codecraft.blackhole.suite.dao" />-->
<!--</bean>-->
<!--<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"-->
<!--destroy-method="close">-->
<!--<property name="driverClassName" value="org.sqlite.JDBC" />-->
<!--<property name="url" value="jdbc:sqlite:/usr/local/hostd/zonesfile.db" />-->
<!--</bean>-->
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-admin/src/main/resources/spring/applicationContext.xml
deleted
100644 → 0
View file @
23d1151b
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:mvc=
"http://www.springframework.org/schema/mvc"
xsi:schemaLocation=
"http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd"
>
<context:annotation-config/>
<bean
id=
"messageSource"
class=
"org.springframework.context.support.ResourceBundleMessageSource"
>
<property
name=
"basenames"
>
<list>
<value>
web_messages
</value>
</list>
</property>
</bean>
<context:component-scan
base-package=
"us.codecraft.webmagic.avalon"
/>
<bean
class=
"org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"
>
<property
name=
"messageConverters"
>
<list>
<bean
id=
"fastJsonHttpMessageConverter"
class=
"com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter"
>
<property
name=
"supportedMediaTypes"
>
<list>
<value>
text/html;charset=UTF-8
</value>
</list>
</property>
</bean>
</list>
</property>
</bean>
<mvc:resources
mapping=
"/static/**"
location=
"/static/"
/>
<mvc:annotation-driven>
</mvc:annotation-driven>
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-admin/src/main/webapp/WEB-INF/web.xml
View file @
c7169328
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<context-param>
<context-param>
<param-name>
contextConfigLocation
</param-name>
<param-name>
contextConfigLocation
</param-name>
<param-value>
<param-value>
classpath*:spring/applicationContext*.xml,
classpath*:
/config/
spring/applicationContext*.xml,
</param-value>
</param-value>
</context-param>
</context-param>
...
...
webmagic-avalon/webmagic-avalon-common/src/main/resources/freemarker.properties
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
freemarker.properties
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/log/log4j.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
log/log4j.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/mapper/DynamicClass.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
mapper/DynamicClass.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-component.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
spring/applicationContext-component.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-datasource.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
spring/applicationContext-datasource.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-a
dmin/src/main/resources
/spring/applicationContext-freemarker.xml
→
webmagic-avalon/webmagic-a
valon-common/src/main/resources/config
/spring/applicationContext-freemarker.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-myBatis.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
spring/applicationContext-myBatis.xml
View file @
c7169328
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<bean
id=
"sqlSessionFactory"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<bean
id=
"sqlSessionFactory"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"databaseIdProvider"
ref=
"databaseIdProvider"
/>
<property
name=
"databaseIdProvider"
ref=
"databaseIdProvider"
/>
<property
name=
"mapperLocations"
value=
"classpath*:/mapper/**/*.xml"
/>
<property
name=
"mapperLocations"
value=
"classpath*:/
config/
mapper/**/*.xml"
/>
</bean>
</bean>
</beans>
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-service.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
spring/applicationContext-service.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-tx.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
spring/applicationContext-tx.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-webmvc.xml
→
webmagic-avalon/webmagic-avalon-common/src/main/resources/
config/
spring/applicationContext-webmvc.xml
View file @
c7169328
File moved
webmagic-avalon/webmagic-avalon-common/src/main/resources/spring/applicationContext-freemarker.xml
deleted
100644 → 0
View file @
23d1151b
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
>
<bean
id=
"freemarkerConfigurer"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"
>
<property
name=
"templateLoaderPath"
value=
"/WEB-INF/pages/"
/>
<property
name=
"defaultEncoding"
value=
"utf-8"
/>
<property
name=
"freemarkerSettings"
>
<props>
<prop
key=
"template_update_delay"
>
0
</prop>
<prop
key=
"locale"
>
zh_CN
</prop>
<prop
key=
"datetime_format"
>
yyyy-MM-dd HH:mm:ss
</prop>
<prop
key=
"date_format"
>
yyyy-MM-dd
</prop>
<prop
key=
"number_format"
>
#.##
</prop>
</props>
</property>
</bean>
<bean
id=
"viewResolver"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"
>
<property
name=
"viewClass"
value=
"org.springframework.web.servlet.view.freemarker.FreeMarkerView"
/>
<property
name=
"suffix"
value=
".ftl"
/>
<property
name=
"contentType"
value=
"text/html;charset=utf-8"
/>
<property
name=
"exposeRequestAttributes"
value=
"true"
/>
<property
name=
"exposeSessionAttributes"
value=
"true"
/>
<property
name=
"exposeSpringMacroHelpers"
value=
"true"
/>
</bean>
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-avalon-common/src/test/java/us/codecraft/webmagic/AbstractTest.java
View file @
c7169328
...
@@ -10,7 +10,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -10,7 +10,7 @@ import org.springframework.transaction.annotation.Transactional;
* @author code4crafter@gmail.com
* @author code4crafter@gmail.com
*/
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath*:/spring/applicationContext*.xml"
})
@ContextConfiguration
(
locations
=
{
"classpath*:/
config/
spring/applicationContext*.xml"
})
@ActiveProfiles
(
"test"
)
@ActiveProfiles
(
"test"
)
@Transactional
@Transactional
public
abstract
class
AbstractTest
{
public
abstract
class
AbstractTest
{
...
...
webmagic-avalon/webmagic-worker/src/main/resources/spring/applicationContext-freemarker.xml
deleted
100644 → 0
View file @
23d1151b
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
>
<bean
id=
"freemarkerConfigurer"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"
>
<property
name=
"templateLoaderPath"
value=
"/WEB-INF/pages/"
/>
<property
name=
"defaultEncoding"
value=
"utf-8"
/>
<property
name=
"freemarkerSettings"
>
<props>
<prop
key=
"template_update_delay"
>
0
</prop>
<prop
key=
"locale"
>
zh_CN
</prop>
<prop
key=
"datetime_format"
>
yyyy-MM-dd HH:mm:ss
</prop>
<prop
key=
"date_format"
>
yyyy-MM-dd
</prop>
<prop
key=
"number_format"
>
#.##
</prop>
</props>
</property>
</bean>
<bean
id=
"viewResolver"
class=
"org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"
>
<property
name=
"viewClass"
value=
"org.springframework.web.servlet.view.freemarker.FreeMarkerView"
/>
<property
name=
"suffix"
value=
".ftl"
/>
<property
name=
"contentType"
value=
"text/html;charset=utf-8"
/>
<property
name=
"exposeRequestAttributes"
value=
"true"
/>
<property
name=
"exposeSessionAttributes"
value=
"true"
/>
<property
name=
"exposeSpringMacroHelpers"
value=
"true"
/>
</bean>
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-worker/src/main/resources/spring/applicationContext-myBatis.xml
deleted
100644 → 0
View file @
23d1151b
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
>
<!--<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">-->
<!--<property name="dataSource" ref="dataSource" />-->
<!--</bean>-->
<!--<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">-->
<!--<property name="basePackage" value="us.codecraft.blackhole.suite.dao" />-->
<!--</bean>-->
<!--<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"-->
<!--destroy-method="close">-->
<!--<property name="driverClassName" value="org.sqlite.JDBC" />-->
<!--<property name="url" value="jdbc:sqlite:/usr/local/hostd/zonesfile.db" />-->
<!--</bean>-->
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-worker/src/main/resources/spring/applicationContext.xml
deleted
100644 → 0
View file @
23d1151b
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=
"http://www.springframework.org/schema/context"
xmlns:mvc=
"http://www.springframework.org/schema/mvc"
xsi:schemaLocation=
"http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd"
>
<context:annotation-config/>
<bean
id=
"messageSource"
class=
"org.springframework.context.support.ResourceBundleMessageSource"
>
<property
name=
"basenames"
>
<list>
<value>
web_messages
</value>
</list>
</property>
</bean>
<context:component-scan
base-package=
"us.codecraft.webmagic.avalon"
/>
<bean
class=
"org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"
>
<property
name=
"messageConverters"
>
<list>
<bean
id=
"fastJsonHttpMessageConverter"
class=
"com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter"
>
<property
name=
"supportedMediaTypes"
>
<list>
<value>
text/html;charset=UTF-8
</value>
</list>
</property>
</bean>
</list>
</property>
</bean>
<mvc:annotation-driven>
</mvc:annotation-driven>
</beans>
\ No newline at end of file
webmagic-avalon/webmagic-worker/src/main/webapp/WEB-INF/web.xml
View file @
c7169328
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<context-param>
<context-param>
<param-name>
contextConfigLocation
</param-name>
<param-name>
contextConfigLocation
</param-name>
<param-value>
<param-value>
classpath*:spring/applicationContext*.xml,
classpath*:
/config/
spring/applicationContext*.xml,
</param-value>
</param-value>
</context-param>
</context-param>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment