This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE struts PUBLIC | |
| "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" | |
| "http://struts.apache.org/dtds/struts-2.0.dtd"> | |
| <struts> | |
| <package name="personDefault" namespace="/" extends="jasperreports-default"> | |
| <action name="personJasperReport" class="org.StrutsJasperReport.action.JasperAction"> | |
| <result name="success" type="jasper"> | |
| <param name="location">/WEB-INF/classes/jasper/person_compiled_template.jasper</param> | |
| <param name="dataSource">personList</param> |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> | |
| <jasperReport name="jasper_test"> | |
| <!-- Our fields from the Person class. --> | |
| <field name="firstName" class="java.lang.String"/> | |
| <field name="lastName" class="java.lang.String"/> | |
| <field name="age" class="java.lang.Integer"/> | |
| <title> | |
| <band height="50"> | |
| <staticText> |
This file contains hidden or 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
| package org.StrutsJasperReport.action; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import net.sf.jasperreports.engine.JasperCompileManager; | |
| import org.StrutsJasperReport.entity.Person; | |
| import org.apache.struts2.convention.annotation.ParentPackage; |
This file contains hidden or 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
| package org.StrutsJasperReport.entity; | |
| public class Person { | |
| private String firstName; | |
| private String lastName; | |
| private Integer age; |
This file contains hidden or 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
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>org</groupId> | |
| <artifactId>StrutsJasperReport</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <packaging>war</packaging> | |
| <dependencies> | |
| <dependency> |
This file contains hidden or 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
| package org.CachingDataSpring; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.cache.annotation.EnableCaching; |
This file contains hidden or 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
| package org.CachingDataSpring; | |
| import java.util.List; | |
| import org.springframework.cache.annotation.Cacheable; | |
| import org.springframework.data.repository.CrudRepository; | |
| public interface CountryRepository extends CrudRepository<Country, Integer> { | |
| @Cacheable("countries") | |
| List<Country> findByCurrency(String currency); |
This file contains hidden or 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
| package org.CachingDataSpring; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication |
This file contains hidden or 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
| package org.CachingDataSpring; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication |
This file contains hidden or 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
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>org</groupId> | |
| <artifactId>CachingDataSpring</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <packaging>jar</packaging> | |
| <name>CachingDataSpring</name> |