This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-actuator</artifactId> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var module = angular.module("sampleApp", ['ngRoute']); | |
module.config(['$routeProvider', '$locationProvider', | |
function($routeProvider, $locationProvider) { | |
$routeProvider. | |
when('/route1', { | |
templateUrl: 'pages/about.html', | |
controller: 'RouteController' | |
}). | |
when('/route2', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>AngularJS Routes example</title> | |
<base href="/" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.min.js"></script> | |
<script src="testCtrl.js"></script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<!-- … --> | |
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-tomcat</artifactId> | |
<scope>provided</scope> | |
</dependency> | |
<!-- … --> | |
</dependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
public class Application extends SpringBootServletInitializer { | |
@Override | |
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
return application.sources(Application.class); | |
} | |
public static void main(String[] args) throws Exception { | |
SpringApplication.run(Application.class, args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class RestConfiguration { | |
@Bean | |
public CorsFilter corsFilter() { | |
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); | |
CorsConfiguration config = new CorsConfiguration(); | |
config.setAllowCredentials(true); // you USUALLY want this | |
config.addAllowedOrigin("*"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.hibernate.SessionFactory; | |
import org.hibernate.boot.MetadataSources; | |
import org.hibernate.boot.registry.StandardServiceRegistry; | |
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; | |
public class SesFactory { | |
public static SessionFactory getSessionFactory(){ | |
final StandardServiceRegistry registry = new StandardServiceRegistryBuilder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.primefaces</groupId> | |
<artifactId>primefaces</artifactId> | |
<version>5.3</version> | |
</dependency> | |
<!-- Hibernate --> | |
<dependency> | |
<groupId>org.hibernate</groupId> | |
<artifactId>hibernate-core</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p:dialog id="Test" header="Test" widgetVar="dlg" modal="true" showEffect="fade" hideEffect="fade" resizable="false"> | |
<p:outputPanel> | |
<h:form> | |
<p:panelGrid columns="2" columnClasses="label,value"> | |
<h:outputLabel value="Tarih" /> | |
<p:calendar locale="tr" pattern="MM/dd/yyyy HH:mm" value="#{testBean.test.tarih}"/> | |
<h:outputLabel value="İlaç" /> | |
<p:inputText value="#{testBean.test.ilac}"/> | |
<h:outputLabel value="Durum"/> | |
<p:selectOneMenu id="cons" value="#{testBean.durum}" style="width:96%"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Context> | |
<Resource name="BeanManager" | |
auth="Container" | |
type="javax.enterprise.inject.spi.BeanManager" | |
factory="org.jboss.weld.resources.ManagerObjectFactory" /> | |
</Context> |
NewerOlder