• 用maven 创建基于spring的可执行的jar

    在工作中,常常用到用maven 去创建j可执行的jar 文件,当然这会用到maven的插件.maven-assembly-plugin ,在通常的情况下,这是一个简单的好用的插件,但是一旦我们的工程中使用了spring 相关的一些jar 包,这时候问题就出现了; 通常的错误如下:Unable to create application context: Unable to locate Spring NamespaceHandler

    2013-09-09[java]

    阅读更多
  • SPRING MVC 结合jquery autocomplete 与 json 的例子

    autocomplete 是一个很不错的WEB展现,幸运的是jquery 已经提供了这样的一个插件. 应该包含在jquery UI 中。在用搜索引擎的时候,比如,百度,谷歌,当我们输入一些要查询的内容的时候,会自动出现一些相关的东西,这就是autocomplete. 其实应该是不难的。先自己想想,在没有任何插件的情况下,一般是这样完成的,根据输入的内容,发送AJAX请求到后台,然后返回内容,在前台用DIV 展示。基本就是这样,当然有很多细节要处理。这里讲一个简单的例子

    2013-08-25[java]

    阅读更多
  • 在spring service 层中使用多种validator

    用spring mvc 开发应用程序,一般会在controller层中配置validator  进行数据校验,但这种情况只适合用于只有一种固定的校验方式,但实际上,校验可能是很灵活的,比如一个单据,在保存提交的时候,单据相关的内容的校验是一种方案,一旦保存成功,就多了单号,然后可能是另外一种校验方案,可能这个例子不是很恰当,但一个中心思想就是,在同一个实体类上的校验,可能存在多种规则,需要选择那一种规则,由程序员自己决定:

    2013-08-15[java]

    阅读更多
  • SPRING DATA JPA 中几种缓存的配置

    在用spring data jpa的过程中,采用了ehcache 来做缓存, 是否需要二级缓存,一般不需要,这得看业务的需要,因为这东西如果配置不好,反而会导致性能下降,但如果是有些数据,基本不改动,长期不变,很少修改,而且数据量适中,并且外部使用频率高的情况下,还是可以使用的。就目前研究spring data jpa 来说,有三种情况下有可能会使用到缓存1. spring data jpa 自身的方法2. 扩展spring data jpa 的方法3.完全自己用EntityManager 写语句的缓存.

    2013-07-24[java]

    阅读更多
  • 关于spring data jpa 在jboss 下配置,运行的备忘

    在jboss 下使用spring data jpa ,容易出现non jta datasource ,的错误,以及在jboss下使用servlet 的注意事项。

    2013-06-27[java]

    阅读更多
  • Spring MVC程序中得到静态资源文件css,js,图片文件的路径问题总结

    用 Spring MVC 开发应用程序,对于初学者有一个很头疼的问题,那就是程序数据都已经查询出来了,但界面样式仍然十分丑陋,加载不了 css,js,图片等资源文件。当你在浏览器上直接输入某个css文件的路径时,直接得到404错误,而路径肯定没有错,其原因就在于在web.xml 中配置了类似如下的 spring servlet,本文总结了5种方法避免出现这种情况。

    2012-11-26[java]

    阅读更多
  • 给新同事做的spring mvc 培训教程及例子

    项目有新人加入团队, 根据项目的情况,对刚毕业的新人做了一个很简单的入门培训,这是 spring mvc 部分, 分别有工程对应. 主要内容如下: 1. 实现最简单的 spring mvc 2. spring mvc 与 model 绑定 3. spring mvc 增删改查,rest 风格, 必须使用 GET,POST,PUT,Delete. 4. spring mvc 返回json 给客户端. 5. 讲义所用到的PPT,作为提纲.

    2014-04-01[java]

    阅读更多
  • Due to limitations of the BasicDBObject, you cant add a second $and

    Using Spring data and Mongodb, below is a function to find data within a date range.

    2019-08-18[Java]

    阅读更多
  • Spring Data MongoDB : Save binary file, GridFS example

    Spring Data MongoDB : Save binary file, GridFS example

    In MongoDB, you can use GridFS to store binary files. In this tutorial, we show you how to use Spring Data’s GridFsTemplate to store / read image in / from MongoDB.

    2019-08-18[Java]

    阅读更多
  • Spring asm dependency issue in Spring Data

    Using Spring Data MongoDB 1.2.1.RELEASE and Spring core 3.2.2.RELEASE, while system is starting, it hits some weird spring-asm IncompatibleClassChangeError errors :

    2019-08-18[Java]

    阅读更多
  • According to TLD, tag form:input must be empty, but is not

    Developing a search form with the Spring MVC framework.

    2019-08-18[Java]

    阅读更多
  • Spring Batch : A job instance already exists and is complete for parameters={}

    Working with Spring Batch 2.2.0.RELEASE, and launches the job with Spring Scheduler.

    2019-08-18[Java]

    阅读更多
  • Spring Batch metadata tables are not created automatically?

    Spring Batch metadata tables are not created automatically?

    If jobRepository is created with MapJobRepositoryFactoryBean (metadata in memory), the Spring batch jobs are running successfully.

    2019-08-18[Java]

    阅读更多
  • Spring Batch Example – CSV File To MySQL Database

    Spring Batch Example – CSV File To MySQL Database

    In this tutorial, we will show you how to configure a Spring Batch job to read data from a CSV file into a database.

    2019-08-18[Java]

    阅读更多
  • Spring Batch unit test example

    In this tutorial, we will show you how to unit test Spring batch jobs with jUnit and TestNG frameworks. To unit test batch job, declares spring-batch-test.jar, @autowired the JobLauncherTestUtils, launch the job or step, and assert the execution status.

    2019-08-18[Java]

    阅读更多
共有 325 条记录 首页123456789 >> 末页

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号