BAEL-1990: IntelliJ plugin example (#4942)
* Initial revision * Add actions and plugin config * Add language tag to search action * Cleanup before submitting
This commit is contained in:
parent
62fa3aa11b
commit
387f9e7e52
|
@ -0,0 +1,62 @@
|
|||
<idea-plugin>
|
||||
<id>com.baeldung.intellij.stackoverflowplugin</id>
|
||||
<name>Stack Overflow Plugin for IntelliJ</name>
|
||||
<version>1.0</version>
|
||||
<vendor email="eugene@baeldung.com" url="http://www.baeldung.com">Baeldung</vendor>
|
||||
|
||||
<description><![CDATA[
|
||||
Plugin to help search Stack Overflow from inside IntelliJ
|
||||
]]></description>
|
||||
|
||||
<change-notes><![CDATA[
|
||||
<ul>
|
||||
<li>1.0 - Initial release</li>
|
||||
</ul>
|
||||
]]>
|
||||
</change-notes>
|
||||
|
||||
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
|
||||
<idea-version since-build="173.0"/>
|
||||
|
||||
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
|
||||
on how to target different products -->
|
||||
<!-- uncomment to enable plugin in all products
|
||||
<depends>com.intellij.modules.lang</depends>
|
||||
-->
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<!-- Add your extensions here -->
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
|
||||
<!-- Add Ask question action to Tools Menu -->
|
||||
<action id="StackOverflow.AskQuestion.ToolsMenu"
|
||||
class="com.baeldung.intellij.stackoverflowplugin.AskQuestionAction"
|
||||
text="Ask Question on Stack Overflow"
|
||||
icon="so-icon-16x16.png"
|
||||
description="Ask a Question on Stack Overflow">
|
||||
<add-to-group group-id="ToolsMenu" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<!-- Add action to search Stack Overflow from file editor -->
|
||||
<action id="StackOverflow.Search.Editor"
|
||||
class="com.baeldung.intellij.stackoverflowplugin.SearchAction"
|
||||
text="Search on Stack Overflow"
|
||||
icon="so-icon-16x16.png"
|
||||
description="Search on Stack Overflow">
|
||||
<add-to-group group-id="EditorPopupMenu" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<!-- Add action to search Stack Overflow from console editor -->
|
||||
<action id="StackOverflow.Search.Console"
|
||||
class="com.baeldung.intellij.stackoverflowplugin.SearchAction"
|
||||
text="Search on Stack Overflow"
|
||||
icon="so-icon-16x16.png"
|
||||
description="Search on Stack Overflow">
|
||||
<add-to-group group-id="ConsoleEditorPopupMenu" anchor="last"/>
|
||||
</action>
|
||||
|
||||
</actions>
|
||||
|
||||
</idea-plugin>
|
Binary file not shown.
After Width: | Height: | Size: 454 B |
|
@ -0,0 +1,14 @@
|
|||
package com.baeldung.intellij.stackoverflowplugin;
|
||||
|
||||
import com.intellij.ide.BrowserUtil;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
|
||||
public class AskQuestionAction extends AnAction
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e)
|
||||
{
|
||||
BrowserUtil.browse("https://stackoverflow.com/questions/ask");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.baeldung.intellij.stackoverflowplugin;
|
||||
|
||||
import com.intellij.ide.BrowserUtil;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.editor.CaretModel;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.psi.PsiFile;
|
||||
|
||||
public class SearchAction extends AnAction
|
||||
{
|
||||
/**
|
||||
* Convert selected text to a URL friendly string.
|
||||
* @param e
|
||||
*/
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e)
|
||||
{
|
||||
final Editor editor = e.getRequiredData(CommonDataKeys.EDITOR);
|
||||
CaretModel caretModel = editor.getCaretModel();
|
||||
|
||||
// For searches from the editor, we should also get file type information
|
||||
// to help add scope to the search using the Stack overflow search syntax.
|
||||
//
|
||||
// https://stackoverflow.com/help/searching
|
||||
|
||||
String languageTag = "";
|
||||
PsiFile file = e.getData(CommonDataKeys.PSI_FILE);
|
||||
if(file != null)
|
||||
{
|
||||
Language lang = e.getData(CommonDataKeys.PSI_FILE).getLanguage();
|
||||
languageTag = "+[" + lang.getDisplayName().toLowerCase() + "]";
|
||||
}
|
||||
|
||||
// The update method below is only called periodically so need
|
||||
// to be careful to check for selected text
|
||||
if(caretModel.getCurrentCaret().hasSelection())
|
||||
{
|
||||
String query = caretModel.getCurrentCaret().getSelectedText().replace(' ', '+') + languageTag;
|
||||
BrowserUtil.browse("https://stackoverflow.com/search?q=" + query);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Only make this action visible when text is selected.
|
||||
* @param e
|
||||
*/
|
||||
@Override
|
||||
public void update(AnActionEvent e)
|
||||
{
|
||||
final Editor editor = e.getRequiredData(CommonDataKeys.EDITOR);
|
||||
CaretModel caretModel = editor.getCaretModel();
|
||||
e.getPresentation().setEnabledAndVisible(caretModel.getCurrentCaret().hasSelection());
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
f5a6ba3b942a82fcbfb72e61502d5c30
|
||||
9201deea
|
|
@ -1,20 +0,0 @@
|
|||
@*
|
||||
* This template takes a single argument, a String containing a
|
||||
* message to display.
|
||||
*@
|
||||
@(message: String)
|
||||
|
||||
@*
|
||||
* Call the `main` template with two arguments. The first
|
||||
* argument is a `String` with the title of the page, the second
|
||||
* argument is an `Html` object containing the body of the page.
|
||||
*@
|
||||
@main("Welcome to Play") {
|
||||
|
||||
@*
|
||||
* Get an `Html` object by calling the built-in Play welcome
|
||||
* template and passing a `String` message.
|
||||
*@
|
||||
@play20.welcome(message, style = "Java")
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
@*
|
||||
* This template is called from the `index` template. This template
|
||||
* handles the rendering of the page header and body tags. It takes
|
||||
* two arguments, a `String` for the title of the page and an `Html`
|
||||
* object to insert into the body of the page.
|
||||
*@
|
||||
@(title: String)(content: Html)
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@* Here's where we render the page title `String`. *@
|
||||
<title>@title</title>
|
||||
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/main.css")">
|
||||
<link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")">
|
||||
<script src="@routes.Assets.versioned("javascripts/hello.js")" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
@* And here's where we render the `Html` object containing
|
||||
* the page content. *@
|
||||
@content
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
*.class
|
||||
|
||||
#folders#
|
||||
/target
|
||||
/neoDb*
|
||||
/data
|
||||
/src/main/webapp/WEB-INF/classes
|
||||
*/META-INF/*
|
||||
|
||||
# Packaged files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
|
@ -1,13 +0,0 @@
|
|||
*.class
|
||||
|
||||
#folders#
|
||||
/target
|
||||
/neoDb*
|
||||
/data
|
||||
/src/main/webapp/WEB-INF/classes
|
||||
*/META-INF/*
|
||||
|
||||
# Packaged files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [SHA-256 Hashing in Java](http://www.baeldung.com/sha-256-hashing-java)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Injecting Git Information Into Spring](http://www.baeldung.com/spring-git-information)
|
|
@ -1,9 +0,0 @@
|
|||
# Set root logger level to DEBUG and its only appender to A1.
|
||||
log4j.rootLogger=DEBUG, A1
|
||||
|
||||
# A1 is set to be a ConsoleAppender.
|
||||
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||
|
||||
# A1 uses PatternLayout.
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
|
@ -1,76 +0,0 @@
|
|||
About the application
|
||||
---------------------
|
||||
This application demonstrates the usage of JavaEE Web Annotations.
|
||||
|
||||
|
||||
Contents of the application
|
||||
---------------------------
|
||||
1. AccountServlet.java - Demonstrates the @WebServlet and @ServletSecurity annotation.
|
||||
|
||||
NOTES: @WebServlet annotation designates the AccountServlet class as a Servlet component.
|
||||
The usage of its parameters 'urlPatterns' & 'initParams' can be observed.
|
||||
An initialization parameter 'type' is being set to denote the type of the bank account.
|
||||
|
||||
@ServletSecurity annotation imposes security constraints on the AccountServlet based on
|
||||
the tomcat-users.xml.
|
||||
|
||||
This code assumes that your tomcat-users.xml looks as follows:
|
||||
|
||||
<role rolename="Admin"/>
|
||||
<role rolename="Member"/>
|
||||
<role rolename="Guest"/>
|
||||
<user username="Annie" password="admin" roles="Admin, Member, Guest" />
|
||||
<user username="Diane" password="coder" roles="Member, Guest" />
|
||||
<user username="Ted" password="newbie" roles="Guest" />
|
||||
|
||||
N.B : To see @ServletSecurity annotation in action, please uncomment the annotation code
|
||||
for @ServletSecurity.
|
||||
|
||||
|
||||
2. BankAppServletContextListener.java - Demonstrates the @WebListener annotation for denoting a class as a ServletContextListener.
|
||||
|
||||
NOTES: Sets a Servlet context attribute ATTR_DEFAULT_LANGUAGE to 'english' on web application start up,
|
||||
which can then be used throughout the application.
|
||||
|
||||
|
||||
3. LogInFilter.java - Demonstrates the @WebFilter annotation.
|
||||
|
||||
NOTES: @WebFilter annotation designates the LogInFilter class as a Filter component.
|
||||
It filters all requests to the bank account servlet and redirects them to
|
||||
the login page.
|
||||
|
||||
N.B : To see @WebFilter annotation in action, please uncomment the annotation code for @WebFilter.
|
||||
|
||||
|
||||
4. UploadCustomerDocumentsServlet.java - Demonstrates the @MultipartConfig annotation.
|
||||
|
||||
NOTES: @MultipartConfig anotation designates the UploadCustomerDocumentsServlet Servlet component,
|
||||
to handle multipart/form-data requests.
|
||||
To see it in action, deploy the web application an access the url: http://<your host>:<your port>/JavaEEAnnotationsSample/upload.jsp
|
||||
Once you upload a file from here, it will get uploaded to D:/custDocs (assuming such a folder exists).
|
||||
|
||||
|
||||
5. index.jsp - This is the welcome page.
|
||||
|
||||
NOTES: You can enter a deposit amount here and click on the 'Deposit' button to see the AccountServlet in action.
|
||||
|
||||
6. login.jsp - All requests to the AccountServlet are redirected to this page, if the LogInFilter is imposed.
|
||||
|
||||
7. upload.jsp - Demonstrates the usage of handling multipart/form-data requests by the UploadCustomerDocumentsServlet.
|
||||
|
||||
|
||||
Building and Running the application
|
||||
------------------------------------
|
||||
To build the application:
|
||||
|
||||
1. Open the project in eclipse
|
||||
2. Right click on it in eclispe and choose Run As > Maven build
|
||||
3. Give 'clean install' under Goals
|
||||
4. This should build the WAR file of the application
|
||||
|
||||
To run the application:
|
||||
|
||||
1. Right click on the project
|
||||
2. Run as > Run on Server
|
||||
3. This will start you Tomcat server and deploy the application (Provided that you have configured Tomcat in your eclipse)
|
||||
4. You should now be able to access the url : http://<your host>:<your port>/JavaEEAnnotationsSample
|
|
@ -1,57 +0,0 @@
|
|||
<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>com.baeldung.javaeeannotations</groupId>
|
||||
<artifactId>JavaEEAnnotationsSample</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<name>JavaEEAnnotationsSample</name>
|
||||
<description>JavaEEAnnotationsSample</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${annotation-api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>${servlet.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<version>${jsp.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<warSourceDirectory>src/main/webapp</warSourceDirectory>
|
||||
<warName>SpringFieldConstructorInjection</warName>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<finalName>JavaEEAnnotationsSample</finalName>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<annotation-api.version>1.3</annotation-api.version>
|
||||
<servlet.version>3.1.0</servlet.version>
|
||||
<jsp.version>2.1</jsp.version>
|
||||
<maven-war-plugin.version>2.4</maven-war-plugin.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -1,10 +0,0 @@
|
|||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
|
||||
|
||||
<login-config>
|
||||
<auth-method>BASIC</auth-method>
|
||||
<realm-name>default</realm-name>
|
||||
</login-config>
|
||||
</web-app>
|
|
@ -1,16 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>My Account</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="bankAccount" method="post">
|
||||
Amount: <input type="text" size="5" name="dep"/>
|
||||
|
||||
<input type="submit" value="Deposit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,12 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Login</title>
|
||||
</head>
|
||||
<body>
|
||||
Login Here...
|
||||
</body>
|
||||
</html>
|
|
@ -1,16 +0,0 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="uploadCustDocs" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file" size="50" />
|
||||
<br />
|
||||
<input type="submit" value="Upload File" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:tns="http://topdown.server.jaxws.baeldung.com/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
targetNamespace="http://topdown.server.jaxws.baeldung.com/"
|
||||
name="EmployeeServiceTopDown">
|
||||
<types>
|
||||
<xsd:schema targetNamespace="http://topdown.server.jaxws.baeldung.com/">
|
||||
<xsd:element name="countEmployeesResponse" type="xsd:int"/>
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
<message name="countEmployees">
|
||||
</message>
|
||||
<message name="countEmployeesResponse">
|
||||
<part name="parameters" element="tns:countEmployeesResponse"/>
|
||||
</message>
|
||||
<portType name="EmployeeServiceTopDown">
|
||||
<operation name="countEmployees">
|
||||
<input message="tns:countEmployees"/>
|
||||
<output message="tns:countEmployeesResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
<binding name="EmployeeServiceTopDownSOAP" type="tns:EmployeeServiceTopDown">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<operation name="countEmployees">
|
||||
<soap:operation soapAction="http://topdown.server.jaxws.baeldung.com/EmployeeServiceTopDown/countEmployees"/>
|
||||
<input>
|
||||
<soap:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
<service name="EmployeeServiceTopDown">
|
||||
<port name="EmployeeServiceTopDownSOAP" binding="tns:EmployeeServiceTopDownSOAP">
|
||||
<soap:address location="http://localhost:8080/employeeservicetopdown"/>
|
||||
</port>
|
||||
</service>
|
||||
</definitions>
|
|
@ -1,2 +0,0 @@
|
|||
###Relevant Articles:
|
||||
- [Introduction to the Java NIO Selector](http://www.baeldung.com/java-nio-selector)
|
|
@ -1,10 +0,0 @@
|
|||
# Properties file which configures the operation of the JDK logging facility.
|
||||
# The system will look for this config file to be specified as a system property:
|
||||
# -Djava.util.logging.config.file=${project_loc:dailymotion-simple-cmdline-sample}/logging.properties
|
||||
|
||||
# Set up the console handler (uncomment "level" to show more fine-grained messages)
|
||||
handlers = java.util.logging.ConsoleHandler
|
||||
java.util.logging.ConsoleHandler.level = ALL
|
||||
|
||||
# Set up logging of HTTP requests and responses (uncomment "level" to show)
|
||||
com.google.api.client.http.level = ALL
|
|
@ -1,52 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Wicket Intro Examples</title>
|
||||
<style type="text/css" media="screen">
|
||||
<!--
|
||||
body {
|
||||
margin: 0px
|
||||
}
|
||||
|
||||
#horizon {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
overflow: visible;
|
||||
visibility: visible;
|
||||
display: block
|
||||
}
|
||||
|
||||
#content {
|
||||
font-family: Verdana, Geneva, Arial, sans-serif;
|
||||
margin-left: -250px;
|
||||
position: absolute;
|
||||
top: -35px;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
height: 70px;
|
||||
visibility: visible
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="horizon">
|
||||
<div id="content">
|
||||
<div>
|
||||
<h3>Wicket Introduction Examples:</h3>
|
||||
<wicket:link>
|
||||
<a href="helloworld/HelloWorld.html">Hello World!</a>
|
||||
<br />
|
||||
<br />
|
||||
<a href="cafeaddress/CafeAddress.html">Cafes</a>
|
||||
</wicket:link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,15 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Cafes</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 800px; margin: 0 auto;">
|
||||
<select wicket:id="cafes"></select>
|
||||
<p>
|
||||
Address: <span wicket:id="address">address</span>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<span wicket:id="hello"></span>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Introduction to the Java 8 Date/Time API](http://www.baeldung.com/java-8-date-time-intro)
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
<bean id="JavaPersonBean" class="com.baeldug.groovyconfig.JavaPersonBean">
|
||||
<property name="firstName" value="John" />
|
||||
<property name="LastName" value="Doe" />
|
||||
<property name="age" value="30" />
|
||||
<property name="eyesColor" value="brown" />
|
||||
<property name="hairColor" value="brown" />
|
||||
</bean>
|
||||
</beans>
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [How to use the Spring FactoryBean?](http://www.baeldung.com/spring-factorybean)
|
|
@ -1,13 +0,0 @@
|
|||
*.class
|
||||
|
||||
#folders#
|
||||
/target
|
||||
/neoDb*
|
||||
/data
|
||||
/src/main/webapp/WEB-INF/classes
|
||||
*/META-INF/*
|
||||
|
||||
# Packaged files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [SHA-256 Hashing in Java](http://www.baeldung.com/sha-256-hashing-java)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [A Guide to Java Enums](http://www.baeldung.com/a-guide-to-java-enums)
|
|
@ -1,5 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [A Guide To UDP In Java](http://www.baeldung.com/udp-in-java)
|
||||
- [A Guide To HTTP Cookies In Java](http://www.baeldung.com/cookies-java)
|
||||
- [A Guide to the Java URL](http://www.baeldung.com/java-url)
|
||||
- [Working with Network Interfaces in Java](http://www.baeldung.com/java-network-interfaces)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [How to Print Screen in Java](http://www.baeldung.com/print-screen-in-java)
|
|
@ -1,9 +0,0 @@
|
|||
# Set root logger level to DEBUG and its only appender to A1.
|
||||
log4j.rootLogger=DEBUG, A1
|
||||
|
||||
# A1 is set to be a ConsoleAppender.
|
||||
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||
|
||||
# A1 uses PatternLayout.
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
|
@ -1,3 +0,0 @@
|
|||
### Relevant articles
|
||||
|
||||
- [Returning an Image or a File with Spring](http://www.baeldung.com/spring-controller-return-image-file)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Injecting Git Information Into Spring](http://www.baeldung.com/spring-git-information)
|
|
@ -1,20 +0,0 @@
|
|||
@*
|
||||
* This template takes a single argument, a String containing a
|
||||
* message to display.
|
||||
*@
|
||||
@(message: String)
|
||||
|
||||
@*
|
||||
* Call the `main` template with two arguments. The first
|
||||
* argument is a `String` with the title of the page, the second
|
||||
* argument is an `Html` object containing the body of the page.
|
||||
*@
|
||||
@main("Welcome to Play") {
|
||||
|
||||
@*
|
||||
* Get an `Html` object by calling the built-in Play welcome
|
||||
* template and passing a `String` message.
|
||||
*@
|
||||
@play20.welcome(message, style = "Java")
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
@*
|
||||
* This template is called from the `index` template. This template
|
||||
* handles the rendering of the page header and body tags. It takes
|
||||
* two arguments, a `String` for the title of the page and an `Html`
|
||||
* object to insert into the body of the page.
|
||||
*@
|
||||
@(title: String)(content: Html)
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@* Here's where we render the page title `String`. *@
|
||||
<title>@title</title>
|
||||
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/main.css")">
|
||||
<link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")">
|
||||
<script src="@routes.Assets.versioned("javascripts/hello.js")" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
@* And here's where we render the `Html` object containing
|
||||
* the page content. *@
|
||||
@content
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +0,0 @@
|
|||
### Relevant articles
|
||||
|
||||
- [Introduction to cglib](http://www.baeldung.com/cglib)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Artiles:
|
||||
- [Filtering a Stream of Optionals in Java](http://www.baeldung.com/java-filter-stream-of-optional)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Testing with Hamcrest](http://www.baeldung.com/java-junit-hamcrest-guide)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [WebAppConfiguration in Spring Tests](http://www.baeldung.com/spring-webappconfiguration)
|
|
@ -1,11 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Introduction to the Java NIO2 File API](http://www.baeldung.com/java-nio-2-file-api)
|
||||
- [Java NIO2 Path API](http://www.baeldung.com/java-nio-2-path)
|
||||
- [A Guide To NIO2 Asynchronous File Channel](http://www.baeldung.com/java-nio2-async-file-channel)
|
||||
- [Guide to Selenium with JUnit / TestNG](http://www.baeldung.com/java-selenium-with-junit-and-testng)
|
||||
- [A Guide to NIO2 Asynchronous Socket Channel](http://www.baeldung.com/java-nio2-async-socket-channel)
|
||||
- [A Guide To NIO2 FileVisitor](http://www.baeldung.com/java-nio2-file-visitor)
|
||||
- [A Guide To NIO2 File Attribute APIs](http://www.baeldung.com/java-nio2-file-attribute)
|
||||
- [How to use the Spring FactoryBean?](http://www.baeldung.com/spring-factorybean)
|
||||
- [A Guide to WatchService in Java NIO2](http://www.baeldung.com/java-nio2-watchservice)
|
||||
- [Guide to Java NIO2 Asynchronous Channel APIs](http://www.baeldung.com/java-nio-2-async-channels)
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||
<persistence-unit name="punit">
|
||||
<class>org.baeldung.persistence.model.Foo</class>
|
||||
<class>org.baeldung.persistence.model.Bar</class>
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/HIBERTEST"/>
|
||||
<property name="javax.persistence.ddl-generation" value="drop-and-create-tables"/>
|
||||
<property name="javax.persistence.logging.level" value="INFO"/>
|
||||
<property name="hibernate.show_sql" value="true"/>
|
||||
<property name="hibernate.cache.use_second_level_cache" value="false"/>
|
||||
<property name="hibernate.cache.use_query_cache" value="false"/>
|
||||
</properties>
|
||||
|
||||
</persistence-unit>
|
||||
</persistence>
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Convert Hex to ASCII in Java](http://www.baeldung.com/java-convert-hex-to-ascii)
|
|
@ -1,2 +0,0 @@
|
|||
Relevant Articles:
|
||||
- [Java String Conversions](http://www.baeldung.com/java-string-conversions)
|
|
@ -1,3 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Join and Split Arrays and Collections in Java](http://www.baeldung.com/java-join-and-split)
|
||||
- [Introduction to Java Servlets](http://www.baeldung.com/intro-to-servlets)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Check If Two Lists are Equal in Java](http://www.baeldung.com/java-test-a-list-for-ordinality-and-equality)
|
|
@ -1,3 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Introduction to Java Servlets](http://www.baeldung.com/intro-to-servlets)
|
||||
- [Intro to the Spring ClassPathXmlApplicationContext](http://www.baeldung.com/spring-classpathxmlapplicationcontext)
|
|
@ -1,2 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Guide to the Spring BeanFactory](http://www.baeldung.com/spring-beanfactory)
|
Loading…
Reference in New Issue