Skip to content

Instantly share code, notes, and snippets.

@iesen
iesen / svn-1
Last active December 31, 2015 20:09
$ svn status
M file1
M resources/resim.png
A MyBean.java
....
M ExperimentalClassNotReadyForCommit.java
@iesen
iesen / svn-2
Created December 19, 2013 11:56
$ svn changelist myChangelist -R .
@iesen
iesen / svn-3
Created December 19, 2013 11:57
$ svn changelist myChangelist --remove ExperimentalClassNotReadyForCommit.java
@iesen
iesen / svn-4
Created December 19, 2013 11:58
$ svn commit --changelist myChangelist
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
...
<context-param>
${spring.profiles.active}
</context-param>
...
public class WebAppInitializer implements WebApplicationInitializer {
private static final Logger logger = LoggerFactory.getLogger(WebAppInitializer.class);
public static final String PROFILE_CONFIG_FILE = "/config/profile.config";
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
try {
// Access profile config file for active profile
Properties properties = new Properties();
# This config file is processed on servlet initialization to activate profile for spring application context
spring.profiles.active=${spring.profiles.active}
...
<profiles>
<profile>
<id>production</id>
<properties>
<spring.profiles.active>production</spring.profiles.active>
</properties>
</profile>
<profile>
<id>development</id>
@iesen
iesen / blog-angularhttp-1
Last active August 29, 2015 14:08
blog-angularhttp-1
// **** Karakter problemi ile karşılaşılır ****
// Eger 'query' non-ascii karakter icerirse server a doğru karakterler gitmez
$http.get("/mysite/foo?name=" + query)
.then(function(data) {
});
@iesen
iesen / blog-angularhttp-2
Last active August 29, 2015 14:08
blog-angularhttp-2
// /mysite/foo?name=queryDegeri şeklinde istek oluşacak ve parametre değeri url encode edilecektir.
$http.get("/mysite/foo", {
params: { name : query }
})
.then(function(data) {
});