- 浏览: 621111 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
oldrat:
引用Special cases aren't special ...
武汉大学开源技术俱乐部 技术交流 第1期 -
yzsunlight:
试了试 ,不行
Android Studio SDK Manager无法正常下载如何设置 -
qianjigui:
更全面的文档:http://www.5wpc.info/it/ ...
Ruby正则表达式操作参考 -
qianjigui:
Anddy 写道Anddy 写道tag是自动创建的吗? 能手动 ...
vim的跳转 -
Anddy:
Anddy 写道tag是自动创建的吗? 能手动创建吗? 在sh ...
vim的跳转
众所周知spring框架是一个非常优秀的轻量级框架工具,我们借助它可以简单的将软件各个部分割裂开以实现较低的耦合度。
那么我们在有些时候强外界发布这些软件时面临着一个选择--是否将spring的相关包一起发布,如果全部一齐发布则可能使原本非常小巧的程式变得非常庞大;
如果不发布则可能使客户端面临程式工作环境配置的复杂程度加大,在这里主要是spring框架的下载、配置和使用。
基于以上情况我们选择一个折衷的办法:将spring工作必须的基本类文件和相关配置文件与我们的程式一起发布出去。在这里的问题就主要是包的选择(类相互的依赖关系)和框架类的一些配置文件的选择使用。
由于我的经历有限,在此我就将我写的一个第三方eclipse插件管理器所面临的一些问题以及获得的经验和大家分享一下。在这里我将用一个简单的spring例子作为替代说明即可。
Ubuntu 7.10 Linux
Eclipse Platform Version: 3.3.0 + MyEclipse 6.0
其中spring框架的加载和配置是通过MyEclipse的插件(MyEclipse-->Project Capabilities-->Add Spring ...-->Spring 2.0 Core ...)实现的。
以下是一个简单的spring使用的程式代码:
< 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-2.0.xsd" >
< bean id ="HelloWorld" class ="springapp.hello.HelloWorld" >
< property name ="message" >
< value > world </ value >
</ property >
</ bean >
</ beans >
public interface Hello ... {
public String sayHello();
}
public class HelloWorld implements Hello ... {
private String message;
public HelloWorld() ... {
message = null ;
}
public String sayHello() ... {
return " Hello " + message + " ! " ;
}
public String getMessage() ... {
return message;
}
public void setMessage(String message) ... {
this .message = message;
}
}
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import springapp.hello.Hello;
public class Main ... {
/** */ /**
* @param args
*/
public static void main(String[] args) ... {
ApplicationContext ctx = new FileSystemXmlApplicationContext(
" /src/applicationContext.xml " );
Hello h = (Hello)ctx.getBean( " HelloWorld " );
System.out.println(h.sayHello());
}
}
最后运行Main类就会显示一些信息:
[ org.springframework.context.support.FileSystemXmlApplicationContext ]
- Refreshing org.springframework.context.support.FileSystemXmlApplicationContext
@f3d6a5: display name
[ org.springframework.context.support.FileSystemXmlApplicationContext@f3d6a5 ]
; startup date [Thu Feb 14 14:50:55 CST 2008]; root of context hierarchy
2008 - 02 - 14 14 : 50 : 56 , 013 INFO
[ org.springframework.beans.factory.xml.XmlBeanDefinitionReader ]
- Loading XML bean definitions from file
[ /home/wpc/workspace/Java/MyStudy/SimplifySpringCoreJar/src/applicationContext.xml ]
2008 - 02 - 14 14 : 50 : 56 , 197 INFO
[ org.springframework.context.support.FileSystemXmlApplicationContext ]
- Bean factory for application context
[ org.springframework.context.support.FileSystemXmlApplicationContext@f3d6a5 ]
: org.springframework.beans.factory.support.DefaultListableBeanFactory@f7f540
2008 - 02 - 14 14 : 50 : 56 , 210 INFO
[ org.springframework.beans.factory.support.DefaultListableBeanFactory ]
- Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@f7f540
: defining beans [ HelloWorld ] ; root of factory hierarchy
Hello world!
由于有个log配置文件的问题可能有些程式运行会有警告信息,这个不要紧,不再讨论范畴。
我的解决方案是:
# For all other servers: Comment out the Log4J listener in web . xml to activate Log4J .
log4j . rootLogger = INFO , stdout , logfile
log4j . appender . stdout = org . apache . log4j . ConsoleAppender
log4j . appender . stdout . layout = org . apache . log4j . PatternLayout
log4j . appender . stdout . layout . ConversionPattern = %d %p [%c] - %m%n
log4j . appender . logfile = org . apache . log4j . RollingFileAppender
# The log file's location
log4j . appender . logfile . File = springframe_log . log
log4j . appender . logfile . MaxFileSize = 512KB
# Keep three backup files .
log4j . appender . logfile . MaxBackupIndex = 3
# Pattern to output: data priority [category] -message
log4j . appender . logfile . layout = org . apache . log4j . PatternLayout
log4j . appender . logfile . layout . ConversionPattern = %d %p [%c] - %m%n
文件命名为log4j.properties然后打包jar并且导入即可。
但是如果将这个工程导出,一般是不携带spring框架类文件的,这时在外部运行Main类就可能出现问题,一般提示是spring相关的类文件无法找到。我当时就是通过这样一些错误信息一步步补全我的spring基础类文件的,应该有相关的工具但是我没有找到。
在这里我就将我的结果给大家:
.:
META-INF
org
./META-INF:
spring.schemas
./org:
apache
springframework
./org/apache:
commons
./org/apache/commons:
logging
./org/apache/commons/logging:
impl
Log.class
LogConfigurationException.class
LogFactory$1.class
LogFactory$2.class
LogFactory$3.class
LogFactory$4.class
LogFactory$5.class
LogFactory.class
LogSource.class
./org/apache/commons/logging/impl:
AvalonLogger.class
Jdk13LumberjackLogger.class
Jdk14Logger.class
Log4JLogger.class
LogFactoryImpl.class
LogKitLogger.class
NoOpLog.class
ServletContextCleaner.class
SimpleLog$1.class
SimpleLog.class
WeakHashtable$1.class
WeakHashtable$2.class
WeakHashtable.class
WeakHashtable$Entry.class
WeakHashtable$Referenced.class
WeakHashtable$WeakKey.class
./org/springframework:
beans
context
core
util
./org/springframework/beans:
AbstractPropertyAccessor.class
annotation
BeanInstantiationException.class
BeanMetadataElement.class
BeansException.class
BeanUtils.class
BeanWrapper.class
BeanWrapperImpl$1.class
BeanWrapperImpl.class
BeanWrapperImpl$PropertyTokenHolder.class
CachedIntrospectionResults.class
ConfigurablePropertyAccessor.class
DirectFieldAccessor$1.class
DirectFieldAccessor.class
factory
FatalBeanException.class
InvalidPropertyException.class
Mergeable.class
MethodInvocationException.class
MutablePropertyValues.class
NotReadablePropertyException.class
NotWritablePropertyException.class
NullValueInNestedPathException.class
PropertyAccessException.class
PropertyAccessor.class
PropertyAccessorUtils.class
PropertyBatchUpdateException.class
PropertyEditorRegistrar.class
PropertyEditorRegistry.class
PropertyEditorRegistrySupport$1.class
PropertyEditorRegistrySupport.class
PropertyEditorRegistrySupport$CustomEditorHolder.class
propertyeditors
PropertyMatches.class
PropertyValue.class
PropertyValues.class
PropertyValuesEditor.class
SimpleTypeConverter.class
support
TypeConverter.class
TypeConverterDelegate.class
TypeMismatchException.class
./org/springframework/beans/annotation:
AnnotationBeanUtils.class
./org/springframework/beans/factory:
access
annotation
BeanClassLoaderAware.class
BeanCreationException.class
BeanCreationNotAllowedException.class
BeanCurrentlyInCreationException.class
BeanDefinitionStoreException.class
BeanFactoryAware.class
BeanFactory.class
BeanFactoryUtils.class
BeanInitializationException.class
BeanIsAbstractException.class
BeanIsNotAFactoryException.class
BeanNameAware.class
BeanNotOfRequiredTypeException.class
CannotLoadBeanClassException.class
config
DisposableBean.class
FactoryBean.class
FactoryBeanNotInitializedException.class
generic
HierarchicalBeanFactory.class
InitializingBean.class
ListableBeanFactory.class
NamedBean.class
NoSuchBeanDefinitionException.class
ObjectFactory.class
parsing
SmartFactoryBean.class
support
UnsatisfiedDependencyException.class
wiring
xml
./org/springframework/beans/factory/access:
BeanFactoryLocator.class
BeanFactoryReference.class
BootstrapException.class
SingletonBeanFactoryLocator$1.class
SingletonBeanFactoryLocator$BeanFactoryGroup.class
SingletonBeanFactoryLocator.class
./org/springframework/beans/factory/annotation:
AnnotationBeanWiringInfoResolver.class
Autowire.class
Configurable.class
RequiredAnnotationBeanPostProcessor.class
Required.class
./org/springframework/beans/factory/config:
AbstractFactoryBean$1.class
AbstractFactoryBean.class
AutowireCapableBeanFactory.class
BeanDefinition.class
BeanDefinitionHolder.class
BeanDefinitionVisitor.class
BeanFactoryPostProcessor.class
BeanPostProcessor.class
BeanReference.class
BeanReferenceFactoryBean.class
CommonsLogFactoryBean.class
ConfigurableBeanFactory.class
ConfigurableListableBeanFactory.class
ConstructorArgumentValues.class
ConstructorArgumentValues$ValueHolder.class
CustomEditorConfigurer.class
CustomScopeConfigurer.class
DestructionAwareBeanPostProcessor.class
FieldRetrievingFactoryBean.class
InstantiationAwareBeanPostProcessorAdapter.class
InstantiationAwareBeanPostProcessor.class
ListFactoryBean.class
MapFactoryBean.class
MethodInvokingFactoryBean.class
ObjectFactoryCreatingFactoryBean$1.class
ObjectFactoryCreatingFactoryBean.class
PreferencesPlaceholderConfigurer.class
PropertiesFactoryBean.class
PropertyOverrideConfigurer.class
PropertyPathFactoryBean.class
PropertyPlaceholderConfigurer.class
PropertyPlaceholderConfigurer$PlaceholderResolvingBeanDefinitionVisitor.class
PropertyResourceConfigurer.class
ResourceFactoryBean.class
RuntimeBeanNameReference.class
RuntimeBeanReference.class
Scope.class
ServiceLocatorFactoryBean$1.class
ServiceLocatorFactoryBean.class
ServiceLocatorFactoryBean$ServiceLocatorInvocationHandler.class
SetFactoryBean.class
SingletonBeanRegistry.class
SmartInstantiationAwareBeanPostProcessor.class
TypedStringValue.class
./org/springframework/beans/factory/generic:
GenericBeanFactoryAccessor.class
./org/springframework/beans/factory/parsing:
AbstractComponentDefinition.class
AliasDefinition.class
BeanComponentDefinition.class
BeanDefinitionParsingException.class
BeanEntry.class
ComponentDefinition.class
CompositeComponentDefinition.class
ConstructorArgumentEntry.class
DefaultsDefinition.class
EmptyReaderEventListener.class
FailFastProblemReporter.class
ImportDefinition.class
Location.class
NullSourceExtractor.class
ParseState.class
ParseState$Entry.class
PassThroughSourceExtractor.class
Problem.class
ProblemReporter.class
PropertyEntry.class
ReaderContext.class
ReaderEventListener.class
SourceExtractor.class
./org/springframework/beans/factory/support:
AbstractAutowireCapableBeanFactory.class
AbstractAutowireCapableBeanFactory$ConstructorResolverAdapter.class
AbstractBeanDefinition.class
AbstractBeanDefinitionReader.class
AbstractBeanFactory$1.class
AbstractBeanFactory$2.class
AbstractBeanFactory.class
AutowireUtils$1.class
AutowireUtils.class
BeanDefinitionBuilder.class
BeanDefinitionReader.class
BeanDefinitionReaderUtils.class
BeanDefinitionRegistry.class
BeanDefinitionValidationException.class
BeanDefinitionValueResolver.class
BeanNameGenerator.class
CglibSubclassingInstantiationStrategy$1.class
CglibSubclassingInstantiationStrategy$CglibSubclassCreator$CallbackFilterImpl.class
CglibSubclassingInstantiationStrategy$CglibSubclassCreator$CglibIdentitySupport.class
CglibSubclassingInstantiationStrategy$CglibSubclassCreator.class
CglibSubclassingInstantiationStrategy$CglibSubclassCreator$LookupOverrideMethodInterceptor.class
CglibSubclassingInstantiationStrategy$CglibSubclassCreator$ReplaceOverrideMethodInterceptor.class
CglibSubclassingInstantiationStrategy.class
ChildBeanDefinition.class
ConstructorResolver$ArgumentsHolder.class
ConstructorResolver.class
DefaultBeanNameGenerator.class
DefaultListableBeanFactory.class
DefaultSingletonBeanRegistry.class
DisposableBeanAdapter.class
InstantiationStrategy.class
LookupOverride.class
ManagedList.class
ManagedMap.class
ManagedProperties.class
ManagedSet.class
MethodOverride.class
MethodOverrides.class
MethodReplacer.class
PropertiesBeanDefinitionReader.class
ReplaceOverride.class
RootBeanDefinition.class
SimpleInstantiationStrategy.class
StaticListableBeanFactory.class
./org/springframework/beans/factory/wiring:
BeanConfigurerSupport.class
BeanWiringInfo.class
BeanWiringInfoResolver.class
ClassNameBeanWiringInfoResolver.class
./org/springframework/beans/factory/xml:
AbstractBeanDefinitionParser.class
AbstractSimpleBeanDefinitionParser.class
AbstractSingleBeanDefinitionParser.class
BeanDefinitionDecorator.class
BeanDefinitionDocumentReader.class
BeanDefinitionParser.class
BeanDefinitionParserDelegate.class
BeansDtdResolver.class
DefaultBeanDefinitionDocumentReader.class
DefaultDocumentLoader.class
DefaultNamespaceHandlerResolver.class
DelegatingEntityResolver.class
DocumentDefaultsDefinition.class
DocumentLoader.class
NamespaceHandler.class
NamespaceHandlerResolver.class
NamespaceHandlerSupport.class
ParserContext.class
PluggableSchemaResolver.class
ResourceEntityResolver.class
SimplePropertyNamespaceHandler.class
spring-beans-2.0.dtd
spring-beans-2.0.xsd
spring-beans.dtd
spring-tool-2.0.xsd
spring-util-2.0.xsd
UtilNamespaceHandler$1.class
UtilNamespaceHandler.class
UtilNamespaceHandler$ConstantBeanDefinitionParser.class
UtilNamespaceHandler$ListBeanDefinitionParser.class
UtilNamespaceHandler$MapBeanDefinitionParser.class
UtilNamespaceHandler$PropertiesBeanDefinitionParser.class
UtilNamespaceHandler$PropertyPathBeanDefinitionParser.class
UtilNamespaceHandler$SetBeanDefinitionParser.class
XmlBeanDefinitionParser.class
XmlBeanDefinitionReader.class
XmlBeanDefinitionStoreException.class
XmlBeanFactory.class
XmlReaderContext.class
./org/springframework/beans/propertyeditors:
ByteArrayPropertyEditor.class
CharacterEditor.class
CharArrayPropertyEditor.class
ClassArrayEditor.class
ClassEditor.class
CustomBooleanEditor.class
CustomCollectionEditor.class
CustomDateEditor.class
CustomMapEditor.class
CustomNumberEditor.class
FileEditor.class
InputStreamEditor.class
LocaleEditor.class
PatternEditor.class
PropertiesEditor.class
ResourceBundleEditor.class
StringArrayPropertyEditor.class
StringTrimmerEditor.class
URIEditor.class
URLEditor.class
./org/springframework/beans/support:
ArgumentConvertingMethodInvoker.class
MutableSortDefinition.class
PagedListHolder.class
PagedListSourceProvider.class
PropertyComparator.class
RefreshablePagedListHolder.class
ResourceEditorRegistrar.class
SortDefinition.class
./org/springframework/context:
access
ApplicationContextAware.class
ApplicationContext.class
ApplicationContextException.class
ApplicationEvent.class
ApplicationEventPublisherAware.class
ApplicationEventPublisher.class
ApplicationListener.class
ConfigurableApplicationContext.class
event
HierarchicalMessageSource.class
i18n
Lifecycle.class
MessageSourceAware.class
MessageSource.class
MessageSourceResolvable.class
NoSuchMessageException.class
ResourceLoaderAware.class
support
./org/springframework/context/access:
ContextBeanFactoryReference.class
ContextJndiBeanFactoryLocator.class
ContextSingletonBeanFactoryLocator.class
DefaultLocatorFactory.class
./org/springframework/context/event:
AbstractApplicationEventMulticaster.class
ApplicationEventMulticaster.class
ConsoleListener.class
ContextClosedEvent.class
ContextRefreshedEvent.class
EventPublicationInterceptor.class
SimpleApplicationEventMulticaster$1.class
SimpleApplicationEventMulticaster.class
SourceFilteringListener.class
./org/springframework/context/i18n:
LocaleContext.class
LocaleContextHolder.class
SimpleLocaleContext.class
./org/springframework/context/support:
AbstractApplicationContext$1.class
AbstractApplicationContext$BeanPostProcessorChecker.class
AbstractApplicationContext.class
AbstractMessageSource.class
AbstractRefreshableApplicationContext.class
AbstractXmlApplicationContext.class
ApplicationContextAwareProcessor.class
ApplicationObjectSupport.class
ClassPathXmlApplicationContext.class
DefaultMessageSourceResolvable.class
DelegatingMessageSource.class
FileSystemXmlApplicationContext.class
GenericApplicationContext.class
MessageSourceAccessor.class
MessageSourceResourceBundle.class
ReloadableResourceBundleMessageSource.class
ReloadableResourceBundleMessageSource$PropertiesHolder.class
ResourceBundleMessageSource.class
ResourceMapFactoryBean.class
StaticApplicationContext.class
StaticMessageSource.class
./org/springframework/core:
annotation
AttributeAccessor.class
AttributeAccessorSupport.class
BridgeMethodResolver.class
CollectionFactory$BackportConcurrentCollectionFactory.class
CollectionFactory.class
CollectionFactory$CommonsCollectionFactory.class
CollectionFactory$JdkCollectionFactory.class
ConstantException.class
Constants.class
ControlFlow.class
ControlFlowFactory.class
ControlFlowFactory$Jdk13ControlFlow.class
ControlFlowFactory$Jdk14ControlFlow.class
Conventions.class
enums
ErrorCoded.class
GenericCollectionTypeResolver.class
io
JdkVersion.class
LocalVariableTableParameterNameDiscoverer.class
LocalVariableTableParameterNameDiscoverer$FindConstructorParameterNamesClassVisitor.class
LocalVariableTableParameterNameDiscoverer$FindMethodParameterNamesClassVisitor.class
LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.class
LocalVariableTableParameterNameDiscoverer$ParameterNameDiscoveringVisitor.class
MethodParameter.class
NestedCheckedException.class
NestedExceptionUtils.class
NestedIOException.class
NestedRuntimeException.class
OrderComparator.class
Ordered.class
OverridingClassLoader.class
ParameterNameDiscoverer.class
PrioritizedParameterNameDiscoverer.class
ReflectiveVisitorHelper$1.class
ReflectiveVisitorHelper.class
ReflectiveVisitorHelper$ClassVisitMethods$1.class
ReflectiveVisitorHelper$ClassVisitMethods.class
SpringVersion.class
style
task
./org/springframework/core/annotation:
AnnotationAwareOrderComparator.class
AnnotationUtils.class
Order.class
./org/springframework/core/enums:
AbstractCachingLabeledEnumResolver$1.class
AbstractCachingLabeledEnumResolver.class
AbstractGenericLabeledEnum.class
AbstractLabeledEnum.class
LabeledEnum$1.class
LabeledEnum$2.class
LabeledEnum.class
LabeledEnumResolver.class
LetterCodedLabeledEnum.class
ShortCodedLabeledEnum.class
StaticLabeledEnum.class
StaticLabeledEnumResolver.class
StringCodedLabeledEnum.class
./org/springframework/core/io:
AbstractResource.class
ByteArrayResource.class
ClassPathResource.class
DefaultResourceLoader.class
DescriptiveResource.class
FileSystemResource.class
FileSystemResourceLoader.class
InputStreamResource.class
InputStreamSource.class
Resource.class
ResourceEditor.class
ResourceLoader.class
support
UrlResource.class
./org/springframework/core/io/support:
EncodedResource.class
LocalizedResourceHelper.class
PathMatchingResourcePatternResolver.class
PropertiesLoaderSupport.class
PropertiesLoaderUtils.class
ResourceArrayPropertyEditor.class
ResourcePatternResolver.class
ResourcePatternUtils.class
./org/springframework/core/style:
DefaultToStringStyler.class
DefaultValueStyler.class
StylerUtils.class
ToStringCreator.class
ToStringStyler.class
ValueStyler.class
./org/springframework/core/task:
AsyncTaskExecutor.class
SimpleAsyncTaskExecutor$1.class
SimpleAsyncTaskExecutor.class
SimpleAsyncTaskExecutor$ConcurrencyThrottleAdapter.class
SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.class
SyncTaskExecutor.class
TaskExecutor.class
TaskRejectedException.class
TaskTimeoutException.class
./org/springframework/util:
AntPathMatcher.class
Assert.class
AutoPopulatingList.class
AutoPopulatingList$ElementFactory.class
AutoPopulatingList$ElementInstantiationException.class
AutoPopulatingList$ReflectiveElementFactory.class
CachingMapDecorator.class
ClassLoaderUtils.class
ClassUtils.class
CollectionUtils.class
comparator
ConcurrencyThrottleSupport.class
CustomizableThreadCreator.class
DefaultPropertiesPersister.class
FileCopyUtils.class
Log4jConfigurer.class
MethodInvoker.class
NumberUtils.class
ObjectUtils.class
PathMatcher.class
PatternMatchUtils.class
PropertiesPersister.class
ReflectionUtils$1.class
ReflectionUtils$2.class
ReflectionUtils$3.class
ReflectionUtils.class
ReflectionUtils$FieldCallback.class
ReflectionUtils$FieldFilter.class
ReflectionUtils$MethodCallback.class
ReflectionUtils$MethodFilter.class
ResourceUtils.class
ResponseTimeMonitor.class
ResponseTimeMonitorImpl.class
StopWatch$1.class
StopWatch.class
StopWatch$TaskInfo.class
StringUtils.class
SystemPropertyUtils.class
TypeUtils.class
WeakReferenceMonitor$1.class
WeakReferenceMonitor.class
WeakReferenceMonitor$MonitoringProcess.class
WeakReferenceMonitor$ReleaseListener.class
xml
./org/springframework/util/comparator:
BooleanComparator.class
ComparableComparator.class
CompoundComparator.class
InvertibleComparator.class
NullSafeComparator.class
./org/springframework/util/xml:
DomUtils.class
SimpleSaxErrorHandler.class
SimpleTransformErrorListener.class
XmlValidationModeDetector.class
*/
*/可能可以再次简化,但是我没有继续进行,如果有兴趣可以继
- SpringCoreJar.zip (688.4 KB)
- 描述: 这个是简化包
- 下载次数: 27
发表评论
-
[转载]Android与Java签名机制与API
2013-10-11 17:00 1221签名的两种方式 利用keystore文件进行签名 ... -
MMTk代码学习(RVM接口)
2012-11-06 14:52 1555前导 MMTk被RVM整个封装在后端,主要调用接口是 org ... -
MMTk代码学习(整体结构)
2012-11-05 17:03 2451必要的整体模块 对于一个完整的内存管理工具,主要涉及: ... -
嵌入式Java虚拟机 GC特性一览
2012-10-31 15:53 1297嵌入式Java虚拟机列表来源:http://en.wikipe ... -
Memory Analysis Tool OQL 用例汇总及语法学习
2012-10-28 16:36 2159典型用例 获取所有对象: SELECT * FROM $ ... -
Memory Analysis Tool 使用相关材料整理
2012-10-28 10:47 2006利用MAT分析问题 从转储(Dump)文件中调试并除错 ... -
JavaScript V8 引擎相关资料
2012-10-25 14:54 1109V8 Javascript engine之所以快 针 ... -
JDK 辅助工具
2012-09-18 19:16 999jps 虚拟机进程状况工具 jstat 虚拟机统计信息监视 ... -
Java Annotation入门
2012-07-14 16:37 814Java Annotation入门 http://www.b ... -
Android JNI 引用讨论
2012-06-11 11:04 1128原文参见:http://my.unix-center.net/ ... -
Java中的引用
2012-02-08 15:18 912强引用是不会被回收的,当内存不足时会抛出OutOfMemor ... -
CORBA相关材料
2009-05-21 17:09 1190CORBA入门 Java源码:CORBA入门 ... -
通过使用java.text package包中提供的类型,将数字类型装换成指定的格式。
2009-03-14 17:32 1390通过使用java.text package包中提供的类型,将数 ... -
最好不要用“局部变量”覆盖“字段”
2009-01-11 15:21 1248从编码习惯和语法规范上讲,很多程序员喜欢使用一些简单的变量作为 ... -
详解MANIFEST.MF文件
2008-10-19 17:33 1577打开Java的JAR文件我们经常可以看到文件中包含着一个M ... -
for,while,do-while,continue(无标号) 之间微妙的关系
2007-09-24 00:58 5747原来对continue的理解停留在表面,粗略的以为就是 在 ... -
spring frame 事务回滚的测试
2008-01-16 22:00 1552我的环境配置 Mysql :server version: ... -
计算器制作JAVA版(综述)
2008-03-01 23:14 1641实在是不好意思,也不知道前一段时间在忙些什么,映象中就是吃饭和 ... -
计算器制作JAVA版(第一步,垃圾字符过滤)
2008-03-01 23:34 1630长话短说,直接进入正题。 首先是对于用户输入的字符进行过滤,滤 ... -
计算器制作JAVA版(第二步,表达式结构检查)
2008-03-02 00:00 1483这个问题一个特点--麻烦! 如何检查结构呢,结构错误是因为不符 ...
相关推荐
首先,Spring框架是Java企业级应用的核心,它提供了一个全面的编程和配置模型,可以简化开发并促进组件的重用。Spring的核心特性包括依赖注入(DI)和面向切面编程(AOP)。DI使得我们可以解耦组件,而AOP则允许我们...
Spring框架是Java开发中最常用的轻量级框架之一,它的核心组件包括了IoC(Inversion of Control,控制反转)和AOP(Aspect Oriented Programming,面向切面编程)。Spring 5.1.4版本是该框架的一个稳定版本,提供了...
在服务层,Spring作为一个服务容器,可以管理bean的生命周期,提供事务管理,并允许开发者使用注解来简化配置。例如,@Service、@Repository和@Controller注解分别用于标记服务类、数据访问类和控制器类,而@...
- **权限问题**:RPM包安装的文件需有正确的权限和用户组,通常使用`chown`和`chmod`命令。 - **启动脚本**:创建一个启动脚本来运行SpringBoot应用,如`/etc/init.d/springboot-app`,并添加到系统服务管理中,如...
对于前端,可以使用JavaScript库如sockjs-client和stompjs与Spring WebSocket服务器进行通信。这些库提供了方便的API来连接、发送和接收STOMP消息。 10. **调试和监控** 开发过程中,可以利用Spring提供的`...
在这个名为"my spring mvc sample app"的项目中,我们看到的是一个基础的Spring MVC应用实例,它能够成功运行并展示基本的功能。 Spring MVC的核心概念包括控制器(Controller)、模型(Model)、视图(View)和...
在实际使用"my-app-spring-boot-starter"时,开发者可以通过在自己的项目中引入该Starter,从而获取其提供的服务和配置。这通常只需要在Maven或Gradle的依赖管理中添加对应的坐标,然后就可以利用Starter中的类和...
如果你使用的是Spring Boot,可以通过添加`spring-boot-starter-websocket`依赖来简化配置。 2. **配置WebSocket端点**:创建一个带有`@ServerEndpoint`注解的类,如`WebSocketConfig.java`,并提供处理连接建立、...
Spring Boot Maven Plugin 是一个 Maven 插件,用于简化 Spring Boot 项目的构建和打包过程。该插件提供了许多有用的功能,例如重新打包可执行的存档、自定义层配置、继承 Starter 父 POM 等。 插件概述 Spring ...
正确理解和运用Bean的作用域对于优化应用程序性能、简化开发流程具有重要意义。本文将详细介绍Spring中不同作用域的Bean,包括它们的特点、应用场景以及配置方法。 #### 二、作用域概述 Spring框架提供了多种作用...
6. **运行和调试**:使用Eclipse的内置服务器或者Tomcat等外部服务器,可以方便地运行和调试Spring应用。在项目上右键点击,选择"Run As" -> "Spring Boot App"或"Debug As" -> "Spring Boot App"。 7. **版本控制...
本项目是基于Spring Boot、Spring、Spring MVC和MyBatis技术栈实现的Flutter微校园APP的服务端程序。这个服务端程序旨在为Flutter前端提供稳定、高效的数据接口,以支持校园生活的各种功能,如课程管理、成绩查询、...
Spring Boot是Java领域中广泛使用的微服务开发框架,它简化了Spring应用的初始搭建以及开发过程。在构建一个问卷调查APP的后端时,我们需要利用Spring Boot的优势来搭建高效、稳定且易于维护的基础框架。以下将详细...
Spring框架是Java开发中广泛应用的一个开源框架,它极大地简化了企业级应用的开发工作。在提供的文件中,我们看到了两个与Spring相关的库:`spring-cglib-repack-3.2.6.jar` 和 `spring-objenesis-repack-2.6.jar`。...
7. **测试和部署**:在本地环境中运行和测试应用程序,确保所有配置正确无误后,使用GAE SDK的命令行工具或IDE插件将应用部署到Google App Engine。 这个过程涉及的技术深度和广度都相当大,涵盖了许多Java开发的...
2. 使用VSCode配置Java和Spring Boot的开发环境。 3. 创建Spring Boot项目,包括主类、源代码目录结构以及pom.xml文件的配置。 4. 通过VSCode的Maven支持构建和运行Spring Boot项目。 5. 设置VSCode的launch.json...
总的来说,Spring Boot CLI 1.5.10提供了一个强大的工具,它简化了Spring应用的开发流程,使得开发者能够更加聚焦于业务逻辑,而非繁琐的配置和构建过程。通过熟练使用CLI,可以显著提升开发效率,尤其是对于快速...
- 用于简化事务管理,可以在类或方法级别使用。 - 示例代码中的`Customer` 类使用了`@Transactional` 注解,表明整个类的方法都具有事务管理特性。 #### 六、自动装配策略 - **`auto-wire` 属性** - 在XML配置...
**JSF (JavaServer Faces)** 和 **Spring** 都是目前广泛使用的Java Web开发框架。JSF 是一个用于构建基于 Java 的 Web 应用程序的标准组件框架,而 Spring 框架则是一个全面的轻量级应用程序框架,用于简化企业级...
基于Spring IoC容器组件模型的这些新部件涵盖了集成、批处理、OSGi、Ajax和Flex集成、状态式Web应用、REST风格Web服务、富客户端用户界面、Google AppEngine开发、基于云的部署、消息、数据访问和Web服务等多功能性...