You all know, that spring supports xml namespaces for defining custom bean definition. For example, if you want to set mvn annotation driven benavior, you can write such code in your xml As you noticed, there is no <bean … /> in this piece of code, but there is So, who is responsible for handling this namespaces? Answer is: NamespaceHandler For example, here is AnnotationDrivenBeanDefinitionParser implementation. Every Spring namespace has an associated NamespaceHandler implementation. The namespace schemas are mapped to schema files inside Spring JARs in various spring.schemas files. The XML schema namespaces are also mapped to handler classes in spring.handlers files (several as each Spring JAR might introduce different namespaces). For your convenience here is a list of most common namespaces: Spring core aop - AopNamespaceHandler c - SimpleConstructorNamespaceHandler cache - CacheNamespaceHandler context - ContextNamespaceHandler jdbc - JdbcNamespaceHandler jee - JeeNamespaceHandler jms - JmsNamespaceHandler lang - LangNamespaceHandler mvc - MvcNamespaceHandler oxm - OxmNamespaceHandler p - SimplePropertyNamespaceHandler task - TaskNamespaceHandler tx - TxNamespaceHandler util - UtilNamespaceHandler Spring Security security - SecurityNamespaceHandler oauth - OAuthSecurityNamespaceHandler Spring integration int - IntegrationNamespaceHandler amqp - AmqpNamespaceHandler event - EventNamespaceHandler feed - FeedNamespaceHandler file - FileNamespaceHandler ftp - FtpNamespaceHandler gemfire - GemfireIntegrationNamespaceHandler groovy - GroovyNamespaceHandler...
I position myself as backend developer, but I truly undestand, that I should know more about frontend world. So, by this post, I will start investigating frontend world. This time I will try angular.js - popular framework for building responsive web applications. Notice, that raw angular.js withour any thirdparty libraries is not so powerful, so I will be using Yeoman, Grunt and Bower in this article for convenient work. Expectation This tutorial will cover: Generating of bare angular.js project. Use Grunt to make testing Use Grunt to deploy application Use Bower to add thirdparty plugins Making some little changes to our application. I assume that you have already installed npm package manager. Prerequisites To be confident during this tutorial I recommend you to have the following skills and resources available: Basic knowledge of command line node.js and npm Knowledge of HTML, CSS, JS Ready, and tested Vanilla JS framework :D (Just joke) Resources You can find this project on his GitHub page Installation Before installation, I should say some words about setting up npm. When I first downloaded and installed npm on OS X and tried to configure project from various tutorials - I received plenty of permission exceptions in...
If you follow the right way of designing your web app, and choosed RESTful architecture, then it should be easy for you to test your appplication. By the REST style, you should implement CRUD operations for each entity in your application. What does it mean: You should be able to Create,Read, Update, Delete(CRUD) your entities. You should provide statuses for each operations. For example, for Create operation you should have 201 status in case of succesful operation. You application must have good exception handling. For example, if you will make GET request for retrieving some entity called person with id - 1, and there will be no such record in your storage with this id, then you need to tell your user, that there is no such person, and set status to 404(Not found) So, given that you will keep in mind all information above and will design your app with such instructions. Now it’s time to write some tests. Which framework you should choose? I choosed Gatling framework. Reasons: It runs on jvm It has maven module Configuration As I mentioned above, I will use maven for building my app. So, I will create a separate module for running...
Have you experienced a situation, when you had a database in your system, and you needed to migrate all it’s structure, to, say, another database ? Of course, you faced such situations and, of course, you manually copied all data from one server instance to another ? Something familiar ? Alternative approach How about idea of writing high-level instructions on how to deal with your database ? For example, you say “Create this table, and add this column , and insert this index, …” only once and all subsequent times you will just reuse this instructions ? Such idea is called “Database migration tool”, there is several migration frameworks for java, but I will show how to work with single tool - liquibase. The idea is that you store this instructions in xml files and when you run your liquibase migration script for the first time, liquibase will create two tables in your database databasechangelog and databasechangeloglock, where all information about running migrations kept. Say, you have only one migration changeset To run such script I use maven, here is pom.xml,as usual mvn liquibase:update If you wish, you can run liquibase from command line, the only thing you need is...
Recently I had an issue with integrating Jenkins CI with Bitbucket CVS.
My goal was to trigger jenkins to start running job, when commit to bitbucket will be pushed.
Steps I made to made jenkins trigger job:
Install Bitbucket plugin
Set the Jekins job’s Build trigger to Poll SCM, but do not specify a schedule
Create a github post-receive trigger to notify the URL
http://yourserver/git/notifyCommit?url=
example
http://builds.yoursite.com/git/[email protected]:nick/project.git
This will tell Jenkins to trigger whenever code in bitbucket will be changed.
Note, that Jenkins will check whether changes were made and will start only in case of new changes in repository.