Development EnvironmentSpring-webmvc - 4 . 0.8.RELEASEjquery-easyui-1.4.0These are the respective version numbers that are used to integrate the layout page.Configuration Spring-mvc.xml configuration The important thing to note here is to configure the file header information within theHttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsdThis is mainly to cooperate with the following for the specific resource interception of MVC processing, or for the
1, download Axis2, now axis2 the latest version is axis2-1.6.2,:http://axis.apache.org/axis2/java/core/download.cgi2, download the zip extracted to put in a directory: I am here to put: C:\software\axis2-1.6.23. Open Eclipse,windwos-->references-->webservers-->axis2 references to add the downloaded axis directory4. Create a new Web project5, create a package (Com.test), a new class under the package: Com.test.Calculate.java Package com.test; Public class Calculate { /** * Calculates 2 in
Pits encountered: The following Jedis version and Spring-data-redis version must be used to achieve cluster effect. Version 1.7 was previously not supported for cluster *********** cluster configuration ********** Single version configuration *******class= "Redis.clients.jedis.JedisPoolConfig" > class= "Org.springframework.data.redis.connection.jedis.JedisConnectionFactory" > class= "Org.springframework.data.redis.serializer.StringRedisSerializer"/> class= "Org.springframework.data.redis.cor
Add View Object
3.3.4 creating templates, writing HTML codeWe create the index.html under Resources/templates, the code is as follows:Start debugging, in Browser input: http://localhost:8080/The effect is as follows:Related Code github:https://github.com/vipstone/springboot-example.gitIv. referencesThymeleaf Official Document Thymeleaf:https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.htmlThymeleaf Official documents Spring + thymeleaf:https://www.thymeleaf.org/doc/tutorials/3.0/
First, M2eclipse plug-inM2eclipse is a plug-in that integrates Maven in Eclipse, which allows users to easily execute MAVEN commands in Eclipse, create MAVEN projects, modify POM files, and more.: https://www.eclipse.org/m2e/m2e-downloads.htmlSecond, installation M2eclipseHelp>install new software. >addName, enter M2EEnter http://download.eclipse.org/technology/m2e/releases/1.4/1.4.0.20130601-0317 in locationI chose version 1.4.Third, installation M2e-extrasWindows->perferences->maven->discovery
Eclipse startup issue after eclipse installs Maven plugin: Maven integration for Eclipse JDK Warning.Workaround: 1. Set up the JRE used by eclipse to natively install the JDK directory: 1.1 Add two lines in Eclipse.ini-vmC:\Program Files\java\jdk1.6.0_10\bin\javaw.exeNote: To write in two lines, write on one line does not take effect, the two lines to be set before-vmargs, otherwise it will not take effect.1.2 or set eclipse--windows--preferences--jav
, args); }}As for this springbootapplication, it is actually a combination of several annotations (previously spoken in the blog), so you can write the settings of the package directly here, and then the @mapperscan is the mybatis provided by the settings annotation.Then there is a bit of configuration file: spring.thymeleaf.cache=false spring.devtools.restart.enabled =true spring.devtools.restart.additional -paths=src/main/java Spring.datasource.driver -class -name= Com.mysql.jdbc.Drive
(sqlsessionfactory sqlsessionfactory) { This. Sqlsessionfactory =sqlsessionfactory; Log.info ("Value of object:" +sqlsessionfactory); Ehcacheutil.getinstance (). Put (CacheName, CACHEKEY, sqlsessionfactory); } Publicsqlsession getsqlsession () {returngetsessionfactory (). Opensession (); }}Here the session exists in the Ehcache permanent cache, discerning eye a look at this there is a problem. But the specific problem, no measurement, no specific data, it is inconvenient to utter.The fol
[] objects; try { user user=new User (); User.setusername ("Longsheng"); objects = Client.invoke ("SayHello", user); Output call result System.out.println (objects[0].tostring ()), } catch (Exception e) { e.printstacktrace (); } } }The above parameters are passed as entities, and the entity needs to implement the serialization interface before it can be transmitted over the network. WEB service is
First, the introduction of the Spring Test package: Text PackageIi. @RunWith: Specify a runner that spring provides to JUnit@ContextConfiguration: Locations specifying the Spring profile location1@RunWith (Springjunit4classrunner.class)2@ContextConfiguration (locations={"Classpath:ApplicationContext.xml"})3 Public classTestSpring1 {4 @Autowired5 PrivatePersonservice PS;6 @Test7 Public voidtest1 () {8 Ps.saveperson ();9 }Ten}Spring and JUnit Test
No nonsense. Direct Source Link: https://git.oschina.net/alexgaoyh/alexgaoyh.git use ehcache to improve the performance of the system, now with a lot of, also support distributed cache, in hibernate as a two-level cache implementation products, can improve query performance. Pom.xml add the ehcache configuration file under src for the project ehcache.xml In the Spring integrated hibernate configuration file, add the following configuration Spring also uses Ehcache, so you also nee
do not want to adjust, download a copy of the IDEA14 shortcut key document to save on the desktop, compared with Eclipse, shortcut features can be found.Refresh in 8.eclipse, cleanup restart is replaced with file->invalidate catch/restart in idea. Encounter various packages and other obvious compilation of different issues, you can clean up Maven fame (that is, the above 4 of the problem), re-click on this is OK.10. More commonly used shortcut, CTRL + N query class, and then through the project
, after all, the log output will have performance corruption. Individuals are advised to record this record, to keep the site of the accident and some errors are required to be logged. And like some meaningless output, itself is superfluous. Finally, don't hit the log at random! When printing the log, also note that you cannot use string concatenation, you need to use placeholders or judge the log level first! Don't let the logs slow down your system! in the next chapter, we will mainly introduc
Name spring.application.name=simon# Configuration Center Server address spring.cloud.config.uri=http://localhost:88884. The controller returns the configuration information obtained from the configuration center, the Simoncontroller.java content is as follows:@RestController @crossorigin@requestmapping ("/api/simon") Public class Simoncontroller { @Value ("${name}") private String name; @GetMapping ("/name") public responsedata get () { Returnnew responsedata(). Succ
use spring's annotation driver .... The wording is as follows:You can use annotations for @controller ("login") to drive, @Scope ("prototype") to indicate that the action is a singleton. The "login" in the @Controller represents the class attribute in the Struts.xml configuration file.Students, see here is not think of struts2 type converter! But I personally think that the Struts2 type converter is still necessary, because the form submitted when the URL request format is the previous one, tha
General steps to build a MAVEN Web project using Jenkins 1 jekins from SVN pull replacement code 2 Deploying the project to the Tomcat container using Apache Tomcat Maven Plugin Specific configuration Procedures 1 New Task Enter an item name, select "Build a free-style software project", click OK2 Configuring source Management Select Subversion in source management and fill in the SVN address to build MAVEN Web project3 Configuration Build In the build, click Add Build Step and select ' Invoke
System settings are primarily used to configure some global settings paths, such as1 JDK2 Ant3 Maven4 Mailetc....Click "System Management" in the Jenkins left menu and click "System Settings" on the System administration page to enter the system settings.1 JDKClick on the "JDK" Install buttonUncheck "Auto Install"Fill in aliases and java_home2 AntSimilar JDK configuration3 MavenSimilar JDK configurationNote1 with MAVEN configuration You can also specify the location of the Setting.xml4 MailSet
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.