java tomcat发布web service教程,前端开发最新技术 - home/lib,{catalina
由于eclipse是自己定义的tomcat配置文件,所以需要加些东西,把shared\lib加入进来,打开ctalina.properties文件。
打开后为(节选):
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the “License”); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
List of comma-separated packages that start with or equal this string
will cause a security exception to be thrown when
passed to checkPackageAccess unless the
corresponding RuntimePermission (“accessClassInPackage.”+package) has
been granted.
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
List of comma-separated packages that start with or equal this string
will cause a security exception to be thrown when
passed to checkPackageDefinition unless the
corresponding RuntimePermission (“defineClassInPackage.”+package) has
been granted.
by default, no packages are restricted for definition, and none of
the class loaders supplied with the JDK call checkPackageDefinition.
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
List of comma-separated paths defining the contents of the “common”
classloader. Prefixes should be used to define what is the repository type.
Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
If left as blank,the JVM system loader will be used as Catalina’s “common”
loader.
Examples:
“foo”: Add this folder as a class repository
“foo/*.jar”: Add all the JARs of the specified folder as class
repositories
“foo/bar.jar”: Add bar.jar as a class repository 拼多多帮助力入口
common.loader=
c
a
t
a
l
i
n
a
.
h
o
m
e
/
s
h
a
r
e
d
/
l
i
b
/
∗
.
j
a
r
,
{catalina.home}/shared/lib/*.jar,
catalina.home/shared/lib/∗.jar,{catalina.home}/shared/lib,
c
a
t
a
l
i
n
a
.
b
a
s
e
/
l
i
b
,
{catalina.base}/lib,
catalina.base/lib,{catalina.base}/lib/.jar,
c
a
t
a
l
i
n
a
.
h
o
m
e
/
l
i
b
,
{catalina.home}/lib,
catalina.home/lib,{catalina.home}/lib/.jar
找到common.loader配置项增加KaTeX parse error: Undefined control sequence: \* at position 28: …me}/shared/lib/\̲*̲.jar,{catalina.home}/shared/lib 这两个路径即可
4、建立项目
新建一个web项目,webservice_web,目录结构如下
HelloService.java是提供web service的一个接口,代码如下:
package com.zxuqian.webservice;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface HelloService {
@WebMethod
String greetings (String name);
}
HelloServiceImpl.java是实现类,代码如下:
package com.zxuqian.webservice.impl;
import javax.jws.WebService;
import com.zxuqian.webservice.HelloService;
@WebService (endpointInterface = “com.zxuqian.webservice.HelloService” )
public class HelloServiceImpl implements HelloService {
@Override
public String greetings(String name) {
return "Hello: " + name;
}
}
5、添加sun-jaxws.xml
sun-jaxws.xml是通过web方式发布web service应用的描述文件,内容如下:
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数前端工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Web前端开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以添加V获取:vip1024c (备注前端)
最后
小编的一位同事在校期间连续三年参加ACM-ICPC竞赛。从参赛开始,原计划每天刷一道算法题,实际上每天有时候不止一题,一年最终完成了 600+:
凭借三年刷题经验,他在校招中很快拿到了各大公司的offer。
入职前,他把他的刷题经验总结成1121页PDF书籍,作为礼物赠送给他的学弟学妹,希望同学们都能在最短时间内掌握校招常见的算法及解题思路。
整本书,我仔细看了一遍,作者非常细心地将常见核心算法题和汇总题拆分为4个章节。
CodeChina开源项目:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
而对于有时间的同学,作者还给出了他结合众多数据结构算法书籍,挑选出的一千多道题的解题思路和方法,以供有需要的同学慢慢研究。
13.png)
整本书,我仔细看了一遍,作者非常细心地将常见核心算法题和汇总题拆分为4个章节。
CodeChina开源项目:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
而对于有时间的同学,作者还给出了他结合众多数据结构算法书籍,挑选出的一千多道题的解题思路和方法,以供有需要的同学慢慢研究。
参考阅读